This is not true. For example major countries like the United States and the United Kingdom are not nation states but can still commit acts of war under international law.