Fortunately, there’s a way: an optionally armed Merchant Navy. Australia once had a Merchant Navy, and the 2023 Strategic Fleet Report proposes (without using the term Merchant Navy) just such a body ...
armored cruisers Carnarvon, Cornwall and Kent, plus the armed merchant cruiser HMS Macedonia and light cruisers HMS Bristol and Glasgow. Only SMS Dresden survived and managed to escape.