The condition at the bottom of the anus could be Sentinel pile.It is not a true pile,but extension of skin caused due to fissure in ano
Fissure in ano is a crack in the anal canal
.the open wound that you are seeing is the fissure.It discharges blood when it is traumatised due to hard stool.
Please take plenty of fluids,green leafy vegetables,high fibre diet for soft stools.It solves most of the problems.
You didn't mention about the bleeding form the anus.
If the swelling is not subsided with the above measures,please consult a Surgeon and get it removed.
Please do not fix it on your own
Wish you good health