Hi
I think you are talking about anal sphincter relaxation. Some times hard stool passes through the anus it's hurt the anal wall which leads to pain and burning during and after defecation. It's called anal fissure.
But when you feel something coming out during defecation is the symptoms of Piles. Piles has no pain but causes discomfort.
Both conditions are mostly due to constipated bowel.
Next Steps
Drink plenty of water.
Avoid fast food or outside foods.
Avoid spicy and fried junk foods.
Eat fibrous and whole grains foods and fruits.
Do regular exercise and Yoga.
Health Tips
Take Panchasakara Churna 3gm at bed time with warm milk or water.
Further if you have any queries regarding this concern feel free to revert back.