I don't see what the problem is.
If you believe an order is illegal despite being told otherwise then you have the option to refuse to obey it. You may, quite rightly, then be court-martialled for doing so. You may then make your case in a public forum. If you were wrong, you take your lumps.
If you believe the verdict was wrong you could appeal all the way up the international courts. (The publicity would significant and, if you were right, I do not believe it would ever go to trial).
If you wish to refuse on "moral", rather than legal grounds, then you also take your lumps. You should have thought about it when you joined. If someone can't take an order, just because they don't like it, they shouldn't have joined the armed forces in the first place - and should resign forthwith before being placed in such a potential situation.