A rectal ulcer happens when one or more of the mucus layers that line the rectum are injured or damaged, resulting in a painful sore. Your rectum is the last few inches of your large intestine (colon) ...