Do you know they are definitely going to? Unless they have very good reason to suspect you abuse it or are doing something illegal, I don't think they *can* just do that to you?
Oh, MDs can and will, for many reasons, pull you off of an opiod/opiate, and it is not necessarily always contingent upon suspected abuse of the drug. For example, if they believe that they have been over-prescribing or on the radar as one that appears to be doing so, in the name of not losing their license to practice, they have and will give you a small supply, a taper schedule, and have you go off of them. This can be especially true if you do not have a obvious, medically diagnosed condition that indicates opiates, you were on a course of treatment that has reached the end of the line (in terms of prescribing guidelines), and either offer a non opiate pain med regimen that includes any other pain medication other than opiates.
I get that there are ethical questions here, of course, but this is way more common than you think. I work with doctors from pain clinics who are now very hesitant to put someone on a regimen of some opiates simply because of the level of perceived risk to them and their practice, and having had countless people become enslaved to them and have to deal with that, and as much as they should, they don't want to deal with it for the most part. I know one pain clinic Anesthesiologist who most of the time refuses to prescribe hard hitting opiates to anyone but patients who are dealing with very obvious and painful conditions. In fact, even if you have a significant back issue that you've been getting pain meds for for "too long", they will start to offer up other interventions, including surgery if when indicated.
I know lots of doctors, and while there are still some that prescribe more liberally than others, they often have a very short leash with pain medication. Even in ERs these days the amount of drug seekers that come in looking to get pain meds are plentiful, and often treated rather harshly, which again, I do not agree with, but doctors in general are on high alert when it comes to opiates. Back in the 90s they handed out Oxycontin and Hydrocodone like it was going out of style, and those days are long over. The prescribing of opiates is one of the most overseen facets of being a practicing MD at this point, which they are acutely aware of. Again, I have my issues with all of it, but it is real after working in a hospital for a long time.