Now that there's a good question, one i've actually been stumped on as well.
Really does depend on the animal, but i'd think in most cases the ears would be folded down in some way. A better idea might be to design headgear that actually meant to fit on a different head shape. I mean seriously now, you can just expect a hat that fits on a human to fit just as well on an animal. For something with a long snout, a circular brimmed hat just isn't as practical as it would be worn on person with a round head.
My advice, make some sorta new
anthrohat, made just for whatever animal it is you're lookin to slap a hat on.