Warships are by definition owned and operated by a government. Privateers are private vessels operating under cover of law by a government.
So, yeah? Warships cannot commit piracy, technically. Really, the whole conversation here is about words and meanings.