True they can.
But please note, like radars, sonars are not made equal. Just because something has a sonar, don't expect to work like a massive flank sonar on a nuclear submarine. Sheer number of hydrophones count, sheer size of array (a bigger ear listens to more than a smaller ear), the amount of power being fed into the system to power the hundreds and hundreds of hydrophones, amplifiers, and not the least, the processing farm needed to process and identify, along with a massive signature database, all the sounds, isolate temperature, salinity, and acidity variations, compare the thousands of sounds heard to the thousands of sounds in the database. Every sub carries within them, what is practically an oceanographic sound laboratory. The question is whether your airborne asset is capable of not just carrying and powering sensors of this size and magnitude, but also has the enormous back end processing to match all the data inflow.
Also there are thermals and currents where temperature, salinity and acidity of the water changes, as well as schools of biologics (shrimps, squid, fish). These create layers that reflect sonar so something underneath the layer can hide from the pinging sonar on top. That's why you have to lower a sonar device underwater and listen depth by depth, at different levels. Even a helo has limited endurance hovering on top, as it listens to the sounds layer by layer. But a hunter killer sub on the other hand, can stay down deep indefinitely and patiently wait for its prey.
But please note, like radars, sonars are not made equal. Just because something has a sonar, don't expect to work like a massive flank sonar on a nuclear submarine. Sheer number of hydrophones count, sheer size of array (a bigger ear listens to more than a smaller ear), the amount of power being fed into the system to power the hundreds and hundreds of hydrophones, amplifiers, and not the least, the processing farm needed to process and identify, along with a massive signature database, all the sounds, isolate temperature, salinity, and acidity variations, compare the thousands of sounds heard to the thousands of sounds in the database. Every sub carries within them, what is practically an oceanographic sound laboratory. The question is whether your airborne asset is capable of not just carrying and powering sensors of this size and magnitude, but also has the enormous back end processing to match all the data inflow.
Also there are thermals and currents where temperature, salinity and acidity of the water changes, as well as schools of biologics (shrimps, squid, fish). These create layers that reflect sonar so something underneath the layer can hide from the pinging sonar on top. That's why you have to lower a sonar device underwater and listen depth by depth, at different levels. Even a helo has limited endurance hovering on top, as it listens to the sounds layer by layer. But a hunter killer sub on the other hand, can stay down deep indefinitely and patiently wait for its prey.