Thank you for the query.
If this lump comes from your anus than it is most likely the hemorrhoid
. When it gets outside and squeezed by the rectal muscle, it starts aching. It is advisable for you to visit a surgeon as usually such hemorrhoid needs to be put back into anus and after acute inflammation will be cured, removal might be the only way for permanent relief.
Moreover, if the blood in stool
appears it is necessary to have colonoscopy
performed, especially if you do suffer also from constipations, are older than 50 or has some weight lost recently.
Hope this will help.