Could an eye infection cause dementia in the elderly?

Unlikely. Eye infections are typically self contained and the majority will resolve on their own within 2 weeks. They will not cause dementia: however, dementia can predispose to eye infections secondary to poor blinking which fails to clear the tear film.