No, Yates was freelancing. She refused to enforce a legal order issued by her President designed to protect it's citizens.
This order was approved as to form and legality by the Department of Justice Office of Legal Counsel.
She was to defend and enforce the laws of the land and her chief executive per her oath of office She was doing neither.
On CNN tonight, Alan Dershowitz criticized acting Attorney General Sally Yates for instructing the DOJ not to defend President Trump‘s travel ban as long as she’s in the position.
Dershowitz told Erin Burnett, “She’s made a serious mistake here. This is holdover heroism. It’s so easy to be a heroine when you’re not appointed by this president and when you’re on the other side.”
He said it would have been better if Yates had done a more nuanced analysis of what parts of the ban are constitutional and what parts aren’t, because “by lumping all of them together, she has made a political decision rather than a legal one.”
Politico adds that Yates was statutorily obligated to defend the President.
Second, the president did not order his principal officer to violate the law. Yates acknowledged that there was a credible argument that the executive order was constitutional—she said only that she was not convinced by the OLC’s determination that it was lawful, hinting at the president’s campaign-trail calls for a “Muslim ban.” But many laws of dubious constitutionality are routinely, and zealously, defended in court by the Justice Department. Her objection, instead, was that the order was unwise or unjust. These may be valid points for a public citizen to raise, but the attorney general has a statutory duty to “[r]epresent the United States in legal matters generally,” regardless of her personal proclivities. …
Third, and most importantly, the Constitution entirely supported Yates’ removal. Article II imposes on the president the duty to “take care that the laws [are] faithfully executed.” Because he cannot perform this solemn responsibility alone, the Constitution grants him the power to appoint officers—with Senate confirmation—who can carry out his orders. But as Chief Justice Roberts recently observed, “to keep these officers accountable,” the president has a critical trump card: “removing them from office.” Perhaps no chief executive in American history is better prepared for this role than the longtime host of The Apprentice. Because Yates, who served as a principal officer, impeded the president’s duty of faithful execution, her removal was entirely justified.