Welcome to HCM,
From your history it seems that you might be having forming abscess
If there is bleeding from anal canal
before passing stool there is a chance of having Haemorrhoid.
Consult surgeon and get physically examined to have clear diagnosis.
In any such case avoid constipation
Take plenty of water.
Ok and bye.