In my view, if someone invades your territory and starts attacking you, you have no obligation to follow any sort of "principles" or "rules" when it comes to how you fight back. Anything you need to do to the attackers in order to defend yourself and your people is, by definition, morally defensible.
(Do note that I said "need". Doing arbitrary messed-up things that don't actually further the goal of driving back the attackers is not ok.)