Unfortunately this calls for pure speculation and we don't like to do that. I would say that such a change in behavior is not uncommon in older pets, but it does not necessarily mean they are close to dying.
I know this has been reported both in people and in animals, so I understand the reason for your question, but I simply cannot say.
What might be a good idea is a veterinary exam. A veterinarian could not only do a complete physical exam but perhaps also some very basic blood work that could give you a very accurate measurement and assessment of health status.
22 is very geriatric for a cat, but of course age is never a disease. That said, I make the decision to assess a cat's quality of life by three measures:
1) if they stop eating
2) if they start hiding or acting different (i.e., more clingy, more affectionate, or more aloof)
3) if they don't act like they did as a younger cat (i.e., when they are 3-4) - if they aren't playful or interactive.
I agree that a vet visit is imperative - especially if she's lost a lot of weight! They'll be able to help assess what's going on, and when the right time to humanely euthanize may be...
Hope that helps, and best of luck with her!