Hi!
Is this lump right on your anal opening? What's the size of it? Does it feels small as a pea and solid on touch? What's its color? Do you find it more painful when you're passing stools? Have you noticed blood in your stool or on a toilet paper?
This lump could be a perianal haematoma, leak of blood just under the skin from the tiny blood vessels that can rupture when the anus stretches during the bowel movements. Haematomas, usually, do not need any treatment and in two weeks are getting painless and slowly start to shrink in size.
Do you have frequency of your bowel movements changed in time? Are you straining to move stool? Do you have chronic constipation or diarrhea?
You may have hemorrhoids( swollen or inflamed veins around the anus or inside the lower rectum.) Actually, you are probably having thrombosed external hemorrhoid that can be find as painful swelling or a hard lump around the anus that results when a blood clot forms. its symptoms, in most cases, will go away within a few days.
Hope i helped a bit!
Best regards!
Marija