Historically ships were sometimes constructed for nations besides the builder such as the Kongo for the Japanese by the British, the British in the South American Dreadnought race, and almost the British again with dreadnoughts to the Ottomans. These were not the only ships by far, but some of the more prominent examples.
Now these each have very different gameplay implementations, Japan which was an ally at the time ordered the Kongo to their specifications and style. As such if we are allies with a nation with better or different tech than us, we should be able to have them construct ships in their yards for us with it costing extra for the buyer and taking up a shipyard slot as that is a feature for the next update. This has immense benefits for nations like the US which lacks the vast majority of the battlecruiser hulls, or a smaller nation who has consumed all of their shipyard capacity and really needs new ships quickly.
For nations with high levels of tech they should have events where they can make ships for minor nations, at the cost of a shipyard slot for the duration. This should result in GDP growth some tensions or unrest in that area of the world, as I expect the US for example to be a bit uneasy with Mexico receiving a state of the art battleship from the British and their increasing ties. This can and should be able to cause a war if relations were on the tipping point. This event should be able to end with the economic collapse of the buyer resulting in scrambling to find a new buyer and even seizing those ships in the drydock if they go to war with you (sorry ottomans, but not sorry).