It should work but the default sonar has very short range. I haven't paid attention to Sonar-FF in a few months so someone can correct me if something has changed.
A while ago I tested a sonarman on neutral ships. I assume because they are not the "same nation," I saw a severe penalty in range compared to using it on its actual nation ship.