It may be a prolapsing piles or may be early rectal prolapse. Both of this may require surgery for permanent solution. Kindly show to some general surgeon like me and get examined physically. Online consutaltion may not help without examination
Next Steps
Avoid constipation, Take salad, lots of water