Yes, I am sure I know what this is from your excellent description, and it is nothing to do with cancer and not serious. I am sorry to hear about your mum. I can understand why you are worrying.
What you describe is a perianal haematoma, or external pile. Despite this name, it is not actually a pile at all, but is really like a blood blister such as you get on your thumb if you trap it or hit it with a hammer.
What causes a blood blister in this situation is that when the bowels are opened the anus stretches, and sometimes a tiny blood vessel will rupture and cause a leak of blood just under the skin. It raises a pea-sized swelling right on the margin of the opening of the anus. It is very tender at first, because the skin is stretched over it in this very sensitive region, and when it is further stretched by passing a stool, it is even worse.
Most of these haematomas do not need any treatment. I expect that by the time you read this, yours is already getting more comfortable. In time it will become pain free, and then it will slowly start to shrink in size, but it may be a few weeks before it disappears altogether.
When they are very large they can be excruciatingly painful and sometimes it is better to carry out a small procedure to let the blood out to relieve the pain. I am sure this will not be necessary in your case.
One other thing to mention is that sometimes as it is getting better, the thin skin over the blood blister bursts, and some very dark coloured bits of blood may be seen. If this happens, don't worry. Just keep the area scrupulously clean and it will soon stop bleeding and heal up.
There is one more thing I am going to mention, although you have not asked about it. You are only 20, so I guess your mum was only relatively young when she had bowel cancer. I am not trying to make you worried here, but I feel I should mention, if you do not know this already, that some forms of colon cancer can be hereditary. This does NOT mean that you are going to get it, but the chances may be a little higher for you than the rest of the population. If your doctor has not mentioned this to you, then there may be nothing to worry about, but I think you should ask your mumís doctor about what sort of colon cancer she had, and remember in future that if you get bowel symptoms like diarrhoea alternating with constipation, bleeding from the rectum, passing mucus, or weight loss, you should always mention this family history to the doctors.
Please don't let this cause you undue anxiety, but I thought I should just mention it.