Is there a way to know if there is a flyback diode?
It’s not too easy. You could test it with a series diode + resistor (like 10K) + LED across the pump and flicker the power with a mechanical switch. If the LED flashes, there is no flyback  diode.
There is no harm in adding an external diode in any case, and I strongly suspect these pumps do not contain an internal diode. If you are planning on PWM, an external Schottky diode would be better in any case (the pumps might not like the PWM though).