Undoubtedly a Princess Bride reference -well-spotted. Though in reality -specifically in Korea, Viet Nam and Afghanistan - the US broke that rule as well!
I always found the Prime Directive to be at best frangible. In the TOS episode Fridays' Child, for instance, the Federation is pursuing a mining contract with the obviously pre-Warp Capellan culture. Where is the PD then? The same in A Private Little War, where Kirk has already visited the medieval planet of Neural. It became of more importance in TNG, and was more strctly adhered to.