Yup, dehydration, electrolyte imbalances, and infection can absolutely cause confusion in older people.
As far as dehydration - the thirst mechanism decreases with aging, so it is not uncommon for older people to become at least mildly dehydrated. I agree with looking to have a glass of fluid with every meal.
One of the key indicators of confusion indicating a delirium rather than dementia is that the confusion has a rapid onset and it fluctuates - the person will have periods of lucidity and periods of confusion. They may become aggressive and loud, or very lethargic. These are indicators that they need to be checked out. Addressing the underlying cause usually fixes the confusion.
Confusion associated with dementia or depression is usually a gradual onset and a long-standing issue. The person slowly declines over time, rather than a sudden acute decline. One thing to keep in mind - some medications can contribute to confusion. Every older person taking multiple medications should ideally have a structured medication review at least once a year. This means the clinician makes a list of all the patient's diagnoses and matches them to prescribed medications. This is valuable for determining if multiple medications are being used for the same condition (depending on the medications and the condition, not all of them may be necessary), identifying medications that may not be appropriate for older people (there is an excellent resource called the Beers list that gives examples of these medications), and identifying "orphan drugs" - medications the patient is taking for which there is no clinical indication. ALL medications, even over the counter ones, NEED to be mentioned to one's provider to ensure there are no interactions.