As I discovered some years back, much to my delight and mentioned by others above, licensed production is the way forward, arrange a license from the originating country and you will then have the blueprints for that ship in your designer, you can modify these and refit the ships as normal. I assume you might need to release the original nation as a puppet or collaboration government to be able to license the templates in your case.
Can get a little costly, as from memory the modification costs on foreign templates are double your own, so you have to decide if it is worth the effort and xp, and what to prioritise, in my latest game, the Polish, Dutch, the French both Free and Vichy have all gladly handed over their Navies so that His Britannic Majesties fleet can better co-ordinate their use to keep the world free.
I may as a result license some destroyer templates so I can fiddle about adding sonar but maybe not, the French Carrier and Battleship blueprints will be the priorities so that I can mod them with effective anti-air. The heavy cruisers I will probably use as surface raiders in one of the few sea zone where I don't have wolfpacks roaming around.
At this point, I have well over 550 ships to tinker with, so I will likely focus on upgrading my RN ships (which I already have superior templates for, and cost less to modify) using the bulk of the unmodernised allied navies to keep the rump fleets of Germany and Italy honest, whilst my modernised battlefleet heads out to smash the Japanese upstarts.