The Prime Directive cannot apply to species which have declared war on the Federatio... Oh, the Mouse that Roared, the Prime Directive cannot apply to species that have the muscle to back up a declaration of War against the Federation.
Besides, Starfleet doesn't declare war or accept declarations of War. The Federation does. The Federation Council is not Bound by Starfleet Regulations. Starfleet is an arm of the Federation that does what it's told, but surely it won't follow ridiculously illegal orders just like anyone else wouldn't either?
China got Iraq's oil. That's hilarious.