The quotes article attributes the threat of attack to Yemen Houthis, which are a rebel group, rather than the official government of Yemen:
A senior official from Yemen’s Houthis has warned cargo ships in the Red Sea to avoid travelling towards Israel and the occupied territories, after the Iran-aligned group claimed an attack on a commercial tanker earlier in the day.
As Houthis do not represent Yemen under the international law, their declarations have no legal meaning. Any attack carried out by them is a criminal act by outlaws - since they exist and act outside of the international law.