The tissue prolapsing from rectum may be hemorrhoids (piles), or a mucosal prolapse or sentinel tag, and less likely rectal prolapse.
The acute severe pain may be due to bleeding into the likes or an accompanying fissure.
Next Steps
Please see a general surgeon at the earliest for examination and diagnosis. you may need surgery.
Health Tips
Pantoprazole will not help. Try sitting in warm water bath for some pain relief. Do not delay a visit to a surgeon