Yes. Infections such as UTIs can trigger delirium, a sudden change in attention, alertness and thinking that develops over hours or days and may fluctuate throughout the day. People with dementia are especially vulnerable because they have less cognitive reserve, so the inflammatory response to an infection can have a more pronounced effect on brain function.