Sounds like either she has impacted anal glands or intestinal parasites. Definitely needs a trip to the vet.
Hi and welcome to the Cat Community. This sounds serious so please get your girl to the vet, ASAP!! Especially since you've noticed a problem for WEEKS. Please, go right away if not to the ER!