If I were planning to sell my stock of the company I work for, then see a non-public draft of the next quarterly report that will make the stock go way up, and cancel my plan to sell based on that information, would this be illegal insider trading?
I will restrict my answer to Canada and the US, the only jurisdictions with which I am familiar.
Contrary to the other answer, the statutory and regulatory insider trading regimes in both the US and Canada require an actual transaction ("purchase or sale of securities") to occur. If no transaction occurs, there is no insider trading.
There is a possible exception: I would be interested to see case law test the question of whether engaging in non-transacted interactions with the market (i.e. adding passive liquidity to the order book) on the basis of inside information might qualify as insider trading in the US under the vaguer 10b statutory text. I suspect not, but I can't state that with any certainty.
Making any decision based on insider information is illegal. Whether the US Government will be able to prove these facts in court is a different question. That said, your post here may be brought in as the proof (and if you think you're anonymous here - think again).
I think the answer becomes super clear when you consider a textbook variation of the same situation.
If you were to buy the stock based on insider information (seeing a nonpublic quarterly report), it is clearly insider trading.
In both cases, nonpublic information leads to an action that results in higher profits.
It's also important to define what "planning to sell" means. If you just thought about it, this is an ethical dilemma. If you had an open sell order, there was a record of your intent to sell.
Not trading on insider information is not insider trading. Generally there must be a trade transacted. There could be an exception if you have an un-transacted order that you cancel, such as a limit order, but I don't know if that has ever been court tested.
One problem with this scenario is if you possess insider information and you proceed with a planned transaction even though it does not meet your best interests. Technically insider trading doesn't require you to benefit. The best advice is to not conduct any trades that involve insider trading, whether they would benefit you or not.
To be extra careful don't publicize your trading plans. If you tell the world you want to make a trade then cancel because of insider information you might be at risk. I'm not saying you committed a crime but there's no reason to test the waters.
Think about this scenario: conspiracy to commit murder is a crime. However to be charged with the crime one must have communicated the plans or have evidence of planning. If you plan to murder someone completely in your head but never tell anyone, write anything down, or possess a murder weapon, no crime has occurred. People think evil things without acting on them constantly. Thought crime is not crime.