I think it's more then confusion- he can talk and make sense and next talk about things in his past not making sense at all. We had to put him in a nursing home with that and his heart. Heart kept him in a hospital bed, has left him not walking and nobody that can lift him. He's incontinent and he can real make a mess when he has a bowel movement. He can really get in bad moods and fuss at our family. He's running family members off. Nobody wants to be yelled at- us kids are very sensitive. Does this sound like Dementia to you?
Confusion can be caused by Medication, even a UTI.
Dementia? It can start out like you are describing. When I look back, the first thing Mom lost was her reasoning. Then how long it took her to process what was being said. She overwhelmed easily. You will see as time goes on that his shortterm memory will go. Having a bad heart will contribute because he is not getting enough oxygen to his brain.
Your Dad is safe, fed and clean. I would not consider bringing him home in the condition he is in. He needs professionals with the right equipment now.