If, for example, society sees fit to deprive me of my right to security (for instance, perhaps it deigns to throw me in jail if I defend myself against a home invasion), then society doesn't get to demand I give my life for its security.
In this way, it is society that has broken the contract with me, releasing me of my obligations to defend it. Most people who claim "duty and obligation to society" conveniently forget this is possible. By accident, I'm sure.
There's a very strong impulse in American society to say that, no matter what situation you find yourself in, there must be a path out of it that doesn't involve doing anything wrong.
If you start with that premise, it's easy to prove that it's impossible to have conflicting duties.
I think this viewpoint is insane, but it's common anyway.
In any case I would hope we would reject the notion that you can become a slave and made to die for the state because you allegedly owe them for something they did for you before you were old enough to even wittingly object or agree to it.
Your enemy is whoever is willing to sacrifice you for their goals, both offensive and defensive. Flags don't matter.
(I do agree with what you are trying to say though)