This is a decision you should make with the help of your vet. You need informed input. It is NOT NORMAL for food (even human food -like ham or chicken) to "run through" a dog. If the dog has digestive issues it might be fixable - like a lack of digestive enzymes, a case of irritable bowel, pancreatitis or a sign of some sort of cancer (especially if the dog has little to no appetite). BUT... if the dog has a cracked or some rotted and painful teeth - it might also have problems eating.
Almost ALL senior dogs develop difficulties walking. Many dogs have some degree of arthritis, spinal issues and/or bad knees. HOW do you KNOW whether any of that can be fixed, if there was never any vet visit for a diagnosis?
Just HOW LONG....has it been since your dog has seen a vet for a FULL PHYSICAL? (Senior dogs should see the vet every 6 months.) Fifty percent of all dogs (over 10 years of age) do develop some type of cancer. Surely, you have not IGNORED the health of your dog?
If your dog cannot walk well, he may INDEED BE IN PAIN - not just having difficulty with balance, or due to blindness (but you would not KNOW THAT - if you have not BOTHERED to consult YOUR VET)!