Conservative Treatments of Phimosis
Phimosis: Is Circumcision necessary?
Phimosos and Paraphimosis
Management of Phimosis
Phimosis
The short answer, if erections cause pain, see your doctor. It's probably covered by your health plan, your doc will be able to discuss it. Pain management is always part of any procedure, so yeah, meds are always included. Your doctor will be better able to discuss your options than anyone here.
Good luck.