Hi welcome to HCM
Bleeding from the anus with swelling suggests Thrombosed pile.It most commonly occurs in people having long standing constipation
.Digital Rectal examination
will confirm the diagnosis.I generally suggest my patients with this kind of problem to take tab.Lyser-D to releive swelling and itch and xylocaine
jelly to apply around the anus to releive pain.Eat foods rich in fibre content.Avoid straining of stools.you can also try stool softners.consult your doctor for expert management.