From history it seems that you are having absolute constipation
Due to passing hard stool, there might be some soreness or cut on anal opening giving rise to passing blood.
Take light laxative daily at night.
Take plenty of water and more fiber containing diet.
Ok and take care.