Its not unheard of for people to be allergic to all the commonly used opioid / opiate drugs, although I believe it tends to be more a case of them being super sensitive to them so that the side effects are intolerable. At any rate there are patients in whom no opiates can be used, and there are procedures for getting around this problem.
When you have to operate on such a patient I believe the standard practice is to use ketamine for the analgesic, thats what we got taught anyway. So if you were having major surgery there shouldn't be too much problems.
The main situation I would see that might cause a problem if opiates can't be used would be minor surgery which is too painful for NSAIDs to be effective, but not major enough for the doctor to feel that ketamine is appropriate, like say getting your wisdom teeth out.
In this situation I would imagine they would just sedate you with midazolam or propofol and not really bother with strong painkillers, on the grounds that it might hurt, but you'd be heavily sedated and so wouldn't complain about the pain, and wouldn't really remember it afterwards anyway.
Also for many minor operations they can numb specific areas pretty well with a nerve block, which is just injecting local anaesthetic higher up the nerve and numbs everything below the injection site. So a combination of local anaesthesia and sedation would probably make up for not being able to use opiates quite effectively.