Since someone else asked and you said you didn't remember, do you think he may have had Normal Pressure Hydrocephalus (NPH)? And the surgery which he had may have been a VP shunt (ventricular-peritoneal) -- something to move fluid away from his brain?
Quite a mouthful for the layman and the symptoms you are describing would fit. NPH has one of my favorite mnemonic in medicine for students learning about the condition, describing the hallmark symptoms as: "Wet, Wobbly and Wacky."
Wet referring to urinary incontinence, Wobbly referring to ataxia/balance issues and Wacky referring to encephalopathy (which could mimic dementia symptoms).
Now that you mention it, it may have been NPH. The thing is, I did the chatting with ChatGPT and handed the printout to the doc. Biology was never my strong suit, so my eyes glaze over when I see words like "Hydrocephalus" :-D