Yes, and it's totally kosher to say "if you stab me on this turn I will order 'all units hold' until the end of the game" - equivalent to resigning.
But it's not OK to irrevocably commit to that decision, by, say, leaving the room and driving home.
I think this is true even in groups that take quite a liberal approach to gamesmanship and what might be cheating in other games: intentionally submitting illegal orders, peeking at other players' orders, etc. I don't know how to reconcile this logically other than by saying the game only works when all players are trying to win. Some would go further and say the game only works when most or all players are trying for a solo victory, since if you can be certain several players are happy with a 3 or 4-way draw that will always be the outcome.