Using a NE555 timer, an output of 11 kHz to 22 kHz sound by driving a piezo buzzer (where 20 K ohm resistor is) at 82 dbl. Adjustable potentiometer of 4.7 K ohm can be smaller for ultrasonic operations.
Internet information lists frequency of most dog whistles is within the range of 23 kHz to 54 kHz, so they are above the range of human hearing.
Tests show dogs can hear sounds in the frequency range of 67 to 45,000 hertz. While frequencies above 36,000 hertz maybe painful to dogs, resulting in whining or barking.
I have not found microphones or sound transducers advertised to handle animal hearing ranges.