I have read other source indicating that the paying of prize bounties was legal through WW1 or WW2 depending on the source, and it was not popular with the various nations, so it did not happen, or did not happen much. I see a couple of paths to privately owned warships. Warships like the Lusitania were designed so they could take guns. The UK had fears the Germans kept guns in the hulls of all there merchant ships for easy conversion. So it is not too much of a stretch for a nation like Germany to keep the guns in the hulls of a ship. Or like in my TL, keep the guns in overseas ports like I did in my TL - Kamerun. These are offensive ships that were owned by private people prewar. Probably technically become government ships in war time on owner ship. There are other similar types actions one could have taken. A lesser nation with merchant ships converted. I would not be surprised if ships like the German sail powered merchant raider in WW1 meets your criteria.
Now to ships built to be warships. Lets start small. I can easily see some colonial company building gunboats at their own expense. I doubt anyone gets worked up over some 3" gun boat in a colony, especially if on interior lake or river. I would not be surprised if this happened IOTL. So it would not be a stretch to see some 105 mm 3X2 destroyers defending some port, especially if pirates were an issue.
Now you may want a real cruiser or bigger. These are a lot harder. The USA had a tradition of privately raised land units (rough riders), so if we have a leader like TR and and some support, I can almost see the "Rough Rider" cruiser assigned to Gitmo as a PR stunt for Teddy running for VP. Or some other leader. We certainly have men like Rockefeller or Vanderbuilts who could afford to build one. It does seem like a bit of a stretch, but we can find parallels in history. Zeppelins were largely driven by private individuals with money, so for example, if a son of Mr. Rockefeller bought Holland electric and had political ambitions, I can see them building a few gasoline submarines to jump start the market. Maybe even sending a few to the Manila to show how capable they are.
Now if you want something like Germany/USA have more than 10 privately held cruiser or larger ships, this is a hard one to see.