I broke a bone in my wrist some time ago and faced the same dilemma. However, I didn't have surgery, so you're in a much more serious situation (assuming you're a recovering addict). I think you should talk to your doctor about this, and ask if you can consult with a pain management specialist at the hospital where you're having surgery. Pain specialists know every imaginable option available, both pharmacologic and non-pharmacologic, and if you tell them that you can't have opioids for whatever reason, they'll work with you to find alternatives.
Click Here to search for a treatment center in your state that is right for you.