If you sink or capture a ship for which you have no valid LoM, you're in danger of becoming a pirate. Supposedly.
The rule seems to be that if Pirates are at least "Wary" to you after the attack, you become a pirate.
Depending on your starting setup, Pirates may already be "Wary" to you, in which case your first act of piracy (or maybe your second, if you get a warning first) will brand you a pirate. Or they may be hostile, in which case you can get away with a lot of illegal plundering without being branded.
So one player (@Hylie Pistof, if I remember correctly) had a Merchant Licence, was sailing into a port under a flag friendly to that port, was attacked by an enemy non-Pirate warship, defeated it, and immediately became a pirate. He lost his Merchant Licence and, as he'd amassed a lot of money, the crew mutinied very soon.
By contrast, in a recent test game (see Unconfirmed Bug - Mutiny problem), I'd started off hostile to Pirates, plundered several ships without having a LoM, and did not become a pirate. The Pirates had gone up a few relation points but not enough to become "Wary". So I did not get a mutiny, which was annoying as I was actively trying to get a mutiny!
The rule seems to be that if Pirates are at least "Wary" to you after the attack, you become a pirate.
Depending on your starting setup, Pirates may already be "Wary" to you, in which case your first act of piracy (or maybe your second, if you get a warning first) will brand you a pirate. Or they may be hostile, in which case you can get away with a lot of illegal plundering without being branded.
So one player (@Hylie Pistof, if I remember correctly) had a Merchant Licence, was sailing into a port under a flag friendly to that port, was attacked by an enemy non-Pirate warship, defeated it, and immediately became a pirate. He lost his Merchant Licence and, as he'd amassed a lot of money, the crew mutinied very soon.
By contrast, in a recent test game (see Unconfirmed Bug - Mutiny problem), I'd started off hostile to Pirates, plundered several ships without having a LoM, and did not become a pirate. The Pirates had gone up a few relation points but not enough to become "Wary". So I did not get a mutiny, which was annoying as I was actively trying to get a mutiny!