Yes, they still take confusion damage just like everyone else.
This is not explicitly stated anywhere but it's pretty easy to confirm just by using a Pokemon with the ability; here is an example of a video where you can see a Doduo hurting itself in confusion. It works the same in every main series game it has appeared in.