The most common cause of gas and diarrhea is a parasite problem. Even if your cat does not go outdoors, this is a consideration.
You should take a fecal sample to your vet to have it checked.
At this age, you have to consider all problems to be a big deal because there is a lot that can go wrong with an older cat.
Let me know if you still have questions. I would be happy to tell you what I know.