Condoms?

I feel like this is a stupid question... But I've only now started learning about a few things. Should your guy be wearing a condom when doing anal? I heard if he doesn't he can get an UTI from it. Is it true?