Threatening the president of the United States is a crime under United States Code Title 18, Section 871.
The two subquestions that I think seem most relevant to your question are:
Does "saying that it would be right to assassinate" someone constitute a threat to assassinate that person?
Does making a conditional statement about whether an assassination should be performed on a political leader with certain qualities, without specifying which leader the statement refers to, count as referring to the President of the United States?
It seems that the answer to the first and possibly also the second is "no". Therefore, in theory, it may be legal even to say that one hopes for or thinks it would be a good thing for the current president of the United States to be assassinated.
"Advocating assassination" and "saying that assassination would be right" seem to be legally distinct; the first may be a crime (depending on the target); the second by itself appears not to be a crime
In the case of speech that directly refers to the U.S. president, protection does not extend to "advocating assassination", the wording you use in your title, if we understand "advocacy" as speech that calls for or encourages others to take the action of assassinating the current president of the United States. A simple example of unprotected advocacy of assassination would be an imperative statement to one's readers or listeners to "Assassinate [X]" or "Kill [X]" (made in a context where it could plausibly be interpreted as expressing a genuine intention). The post "ASSASSINATION THREATS AGAINST THE PRESIDENT: WHAT LANDS YOU IN PRISON?" from The Reeves Law Group gives some examples of threats of this type that led to convictions.
I am unsure whether threatening or advocating the assassination of any unspecified political leader conditional on circumstances that could apply to a president of the United States might be considered a threat to the president of United States or not. (E.g. saying "I will kill any leader that does [X]" or "Kill any leader that does [X]", where "does [X]" is something that either applies currently or could apply in the future to the US president.)
The Wikipedia article on Threatening the president of the United States cites the following two cases which appear relevant:
The posting of a paper in a public place with a statement that it would be an acceptable sacrifice to God to kill an unjust president was ruled not to be in violation of the statute. The statute does not penalize imagining, wishing, or hoping that the act of killing the president will be committed by someone else.
- United States v. Marino, 148 F Supp 75 (DC Ill 1957).
- United States v. Daulong, 60 F Supp 235 (DC La 1945).
The text publicly posted by Marino, which was found not to be criminal, was "There can be slain no sacrifice to God more acceptable than an unjust President".
It was apparently decided that it was not criminal for reasons related to both subquestion 1) and 2) that I identified above:
There is in the quoted words no expression of intent on the part of the defendant to injure the President or anyone else, or in fact to do anything whatsoever. Considered as a general observation, the alleged assertion is not pleasant and makes little sense; but it is not a "threat". Further, it is not at all clear to what President the statement refers. Under the Statute, the threat must be against the then President of the United States, Metzdorf, supra. The indictment alleges no innuendo connecting it with the present President, and certainly none is apparent. The statement could relate to any president, past or future, of any country.
In the case of Daulong, he apparently was reported as stating that if someone did not kill the President, he "had a notion" to do it himself, and that he "hoped somebody gets" the President tonight, and if somebody did not he "felt like" going up there and doing it himself.
Here are quotations from the opinion on why this was found not to be criminal:
If the defendant had simply said that someone should or ought to kill the President, with no declaration or other indication that the speaker intended or would commit the act, it seems clear that this would not amount to a threat [...]
The statute does not penalize the imagining, wishing or hoping that the act will be committed by someone else. It was intended to prevent persons, whether with serious intention to carry them out or not, from making actual threats against the Chief Executive, even without communicating them to him, as being calculated to inspire or encourage the hearers to attempt such acts.
Therefore, my understanding is that as long as a statement does not express a purpose to carry out assassination (either personally, or by encouraging others to do so), but restricts itself to commenting on whether an assassination in such circumstances should occur or should be hoped for, it would not be a threat and so would not be criminal.