Thanks for query,
It seems that you might have bleeding piles.
you might have constipation
and hard stool passing might given abrasion to piles giving rise to bleeding.
It is also possible that you might have Fissure in ano
Consult surgeon and got diagnosed.
Avoid constipation,taake mild laxative at night.
Take plenty of water,
Avoid fried and junk food.
ok and bye.