I am sorry your girl has this issue.
It is either her anal sacs or a UTI:
This is most likely a urinary tract infection. While this is much less serious in a female,, it is painful nevertheless.
UTI's must be treated with an effective broad spectrum antibiotic like Clavamox or clidamycin and for a long enough duration so all bacteria is eradicated. If not, they will refluorish, stronger and more resistant and re infect her . In addition, the bacteria can become tolerant of the same antibiotic so the medication should be varied for best results.
Anything new is very stressful to a cat because kitty's HATE change and stress can lead to illness so you want to watch for any developing symptoms.
Give her a teaspoon of plain yogurt every day. That will keep "good" bacteria in her colon.
She can also have one drop of unsweetened cranberry juice every day to lower the PH of her stool and urine.
Please let me know how she is feeling .
Sincerest best wishes for her,