How long of a surgery? What procedure specifically?
If you tell them they will probably cancel the procedure, depending on the necessity of the surgery.
If you are a pretty heavy IV user you might be at greater risk for complications like hypovolemic shock. Central and peripheral venous access is also obviously impaired in IV drug users.
The actual anesthetic protocol would likely remain the same but they will watch you a bit closer (and in a somewhat different manner) if they are aware you are an IV opioid user.
But yes you are also right, they will approach your post operative pain control differently if they are made aware.
You could also request to call off the procedure yourself and wait a longer perioid before undergoing surgery.