This actually may be an impacted anal gland. They can be very painful, but fortunately the treatment is easy and inexpensive and very effective! If it is an inpacted/infected anal gland, the vet will drain it, and probably put her on oral antibiotics. This is something you may need to have done periodically, although in cats, it doesn't happen very often.
Of course, there are other things it could be such as a cyst or cancer, but if your vet suspects anything unusual, he/she will take a biopsy of the lump and have it analyzed by a pathologist. At that time, you will know more. The one thing in your favor in my mind is that this seems to be painful to her....it's VERY unusual that a cancer would be painful unless it was extremely advanced. I don't think that is what you are going to be dealing with, and feel this is going to be an infection of some type that will be easily fixed.
You are doing the right thing taking her in today. Any time you find a lump or bump on you or your pet, having it checked out immediately is the wisest course of action.
Please let me know if I can help further in any way and I would love to know what your vet finds also, if you would like to share the information with me.
Feline Healthcare
16 yrs health care mgmt & issues relating to cats, reproductive issues and multicat environments