Hello.Some perianal pathologies as hemorrhoids or anal fissure
are common causes of pain in the rectum
Your doctor with a simple exploration can rule out these pathologies.
If the perianal area is normal, maybe it would be necessary to perform a colonoscopy
to rule out other pathologies of the rectum or colon.
I wish you good health.
(If the answer has helped you, please indicate this)