During David Frost's series of interviews with Richard Nixon, Nixon (in)famously said
when the President does it, that means that it is not illegal, by definition.
In the aftermath of Nixon getting almost impeached, and having to resign, due to his thwarting of the Watergate investigation, the public widely interpreted this phrase as Nixon expressing the opinion that a President above the law.
But was that really what was being said?
As an analogy (comparing this to a different unrelated situation to demonstrate a principle), let's ask what happens if a police officer says "if a police officer does it, then it's not illegal." Can this be true?
That depends on what it is that they do. A police officer is not doing anything illegal by the virtue of wearing a police uniform and claiming to be a police officer. While a non-policeman, doing the same thing, would be committing the crime of impersonating a police officer. So "if a police officer does it, then it's not illegal" is absolutely true in such a situation.
In a similar vein, there is a number of actions which fall within the scope of the Presidential authority. So if a President exercises the powers of his office as he sees most appropriate, then that's not illegal. While someone else trying to exercises the power, that belongs to the President, that would be illegal.
So the question rests on whether what was being discussed was within the purview of the Presidential powers. Nixon's phrasing was vague. He said
if it's in the best interests of the nation or something
But national defense is within the powers and responsibilities of the Presidential authority. So what was technically wrong with the statement?