Hello dear
Warm welcome to Healthcaremagic.com
I have evaluated your query thoroughly .
*  There are various reasons for 
blood in stool which may be fissure ,     
hemorrhoid or else internal issue .
*  Consulting  a doctor  when it happens , help to get the proper diagnosis 
    and  further  management  guidelines  to  cure  it  permanently .
*  Suggestions  till you consult your doctor 
-  Avoid hard stools by managing diet with high fiber content and plenty of
    liquids .
-  Sitz bath ( sitting in tub filled with lukewarm water 3 times a day 10 
   minutes each session )
-  Avoid all  oily , spicy , non veg , hot beverages .
-  No  
smoking , alcohol .
Hope this will help you for sure .
Welcome for any further questions .
Regards dear .