Right you aaarrrrrrgggggghhhhh, matey.
The two are sometimes confused, though, because many of the ships that turned pirate had been privateers unleashed in the Caribbean by the English against the Spanish and French.
Naval wars must have been messy affairs in the early days of sail and before standing navies. Privateers were a way of having a “pickup” navy with which to confront enemy shipping without having to support that ships & crews in peacetime. There wasn’t a whole lotta differentiation between merchant ships & warships then either.