Like many others, I served after Calley’s trial, and was briefed on my obligation not to follow illegal orders.
Of course, we were not told how to determine a legal from an illegal order, or what the mechanism was for the proper way to refuse an illegal order. Essentially all this did was to further stir up the muddy water.
Go back and read about public sentiment at the time this was unfolding.
When I was in Navy OCS the question of illegal orders came up. The JAG instructor said that the determination if an order was legal or illegal would be made at your General Court Martial.