They should not hurt the dog's ears as long as they are not blown really loudly right by the ear same as with any other whistle. If you blew a police whistle right next to your ear really loudly it would be uncomfortable for you.
The dog whistles just create sound vibrations that our ears are not able to detect but a normal dog's ears can.
You can read about dog whistles here
Hope this helps you!