UK paperback, possibly early eighties.
This man goes to the used spaceship dealership. The salesman shows him many types but his eyes are continually drawn to a beat up old heap in the corner which he eventually buys.
He takes it for a familiarisation cruise and finds a lot of strange tech hidden under the floors and behind wall panels, it soon becomes apparent it's highly advanced and also has a near AI computer that can do camouflage.
He then has adventures on different planets but I only remember one…
This world is having (I think) a civil war and he decides to intervene to save life. Initially he sets up a plan to approach this world as a galactic warlord and give them a common enemy.
The planet's defence see a small spaceship and a (projected) battle cruiser approaching. He shows up on their screens in fancy uniform giving out orders. He snarls out “Master-at-Arms!” and a grizzled veteran with a sardonic smile appears on the screen with a crisp “Yes Sir?” and he gives some order about demonstrating firepower, all in full view of the planet leaders.
At this point alarm bells are ringing in the protagonists mind, the faked soldier seemed a bit too realistic!
I don't recall how he then solved this war but later he's out in space and he chats to the computer with his suspicions. Then a big reveal and a real battle cruiser uncloaked beside his spaceship and the same Master-at-Arms tells all.
They need people of a particular mindset to be secret Galactic Police, the junk spaceship is designed to appeal only to the people with such a mind, therefore he is now a super cop and commands this precinct.
Update: The answer was 'Interstellar Patrol' (2003) by Christopher Anvil and I've checked it as correct, however that book is a fix-up containing the much earlier story 'The King's Legions' (1967) which was actually the original story I was trying to recall