The President cannot legally order a soldier to do an illegal thing. What a soldier is allowed to do is covered by the Geneva Convention, to which the US is signatory
The only part of the Conventions not binding on the US are the two 77 protocols, which Congress did not ratify, but those only deal with the extention of the 49 protocols to non-combatants and certain types of other soldiers.
http://historynewsnetwork.org/article/586
This by the way, is the loophole Bush used in his infamous "illegal enemy combatants" declaration.
Other references:
https://www.thebalance.com/military-orders-3332819
http://www.omjp.org/ArtLarryDisobey.html
https://www.buzzfeed.com/mikehayes/...-his-finger-on?utm_term=.jaBQ0O3D2#.lnAPWYwZK
That they argue it does not make it correct, nor does it ensure that they will be obeyed.