You, the owner decides. There is even a term for it now - "economic euthanasia" when owners can not afford or no longer afford the treatment their cat needs. It's one of the cold, hard realities of life, sadly - and doesn't make you an evil person. You've done the best you can for 17 years, and elderly cats can get extremly expensive in their care - both financially and mentally. The people who are passing judgement clearly have never been there. And find her another home? How ridiculous, as I bet that poster isn't willing to take on an elderly cat with health issues. Only you can decide if it's time or not. But first do have a heart-to-heart talk with the vet to see if there are any options for you (cerenia if it's available is much stronger than pepsid and works much better on the nausea) and if it's possible to decrease your expenses. If it turns out that isn't an option for you, then do what you need to do - but please be with her at the end. She's been a good friend for 17 years, and you should be there.
many years of cat rescue (and elderly cats)