This could be a wide range of things, intestinal parasites, an allergy, liver disease, gastroenteritis... probably many other things too. Can you take her to the vet?
Wow 22 is a fantastic accomplishment. It really could be a number of things. When did your cat last have blood work done? Senior cats need to have blood work done on a fairly frequent basis as a way to track organ function. Just as with people things begin wearing out as they get older.
We recently had to put our 22+ year old cat down, we know how hard it is, but you do not want your precious one to suffer. Get your precious one to the Vet and hopefully there is a way to help. We are saying a prayer!