Allergy meds are generally safe to take together with opioids. A pill with 50mg dimenhydrinate does the job for me. This is a very common substance found in allergy meds. Other types will work too but I just mentioned that one because it's one of the most common and it works well in reducing the histamine response that many opioids (and opiates especially) trigger.
Do you remember what opioid you were given? Your reaction sounds a bit on the extreme side of a general histamine response to me. It's possible that the dose was too high for you and/or that your body disagrees with that particular substance given. Morphine may be the OG, gold standard for pain relief in hospital, but it affects a fair number of people negatively (in the way you were affected). Synthetic (and some semi-synthetic) opioids are often easier for the body to handle (oxycodone, fentanyl, and others).