Earlier quoted context omitted.
For you or me that’s a really valid concern, but the damage to someone from opiate abuse is so extreme I think they’d take that risk. In fact some might even see the inability of a well meaning medical professional to dose them with an opiate as a feature, not a bug.
The hard part is that anesthesia is not just for comfort. I am not a doctor, but having the body in a low excitement mode for complex surgery must be an advantage. So resistance to anesthesia could mean no surgery beyond the most basic ones.
There are a lot of options for anaesthesia, and many of them are not opioids. For example, there is a whole set of halogenated ethers like sevoflurane and isoflurane (the most typical inhaled anesthetics). Their chemical structures and mechanisms of action are very different from opioids, so the vaccine-produced antibodies would not recognise or react with them. This is true for many of the other options (benzos, ketamine, even xenon gas).
That said, opioids are useful. They are very good analgesics (pain relievers) and can be used as anesthesia in certain situations, like cardiovascular patients. However, for most people in most situations, there are other non-opioid options.