Respected user, hi I evalauted your query thoroughly.
*It is 
Hemorrhoid prolapsed through pressure at the time of 
diarrhoea.
*Has to consult Consultant Surgeon for proper clinical evaluation & cure till 
  that time you take following precautions :
- avoid all oily / spicy / nonveg stuffs
- take home made light diet with yoggurt
- maintain your hydration with preferably boiled water, coconut water, home 
  made juices , butter milk
- avoid 
smoking / alcohol if consuming
- sit in Sitz Bath ( sitting in a tub filled with leukwarm water for 10-10 
  minutes mor & eve & additionally after passing stool )
- apply 
Xylocaine (5%) jelly over it 3-4 times a day for soothing
- keep the anal region clean & dry
 Hope this clears your query .
 Thanks for using Health care magic & keeping trust in our medical services
 Wishing you fast and speedy recovery from the same.
 Regards dear take care.