Frankly, I’d love to defend any soldier being disciplined for defending a child from a rapist, ally or enemy. Even if in direct contravention of an order, I think the soldier has a good defense. Heck, I’d say it was a moral duty, just like the duty to disobey an unlawful order.
Related: The President is the commander in chief. He sets the policy and thus he should be able to say at any moment if a particular thing is US military policy or not.