Originally Posted by
Qualia
It definitely happened before the event of WC3. Aegwynn, by the time of WC3, already lost so much power from getting back to Azeroth from wherever Sargeras banished her to and resurrecting Medivh that she couldn't even create (a) powerful enough ward(s) to hide herself, much less wards as powerful as the ones in the tomb. It's possible that Illidan wasn't demonic enough yet by the time of WC3, and only turned full demon after taking the Eye of Sargeras and whatever lingering power of Sargeras there.
This is not entirely correct. For once, Illidan himself pointed out in his monologue (to himself, thus, there was no reason to lie, as opposed to saying something to another) that he was infiltrating the Legion
Secondly, even during the WoTA triology, it was never stated in Demon Soul that Illidan ultimately decided to join the Legion. The book depicted how bitter he as towards Malfurion, how much he loved power (especially towards the Well) and that by the end of the book, he had "contradictory thoughts and notions" - but that was all it was. It wasn't flat out stated that he decided to betray the NE anywhere. Of course, the book ended up with Illidan claiming to Azshara's palace that he was there to join them, but that could be just a guise - how would he infiltrate them otherwise? By saying "Hey demons, I'm here to infiltrate your ranks"? All in all, while it did hint at Illidan's betrayal, it wasn't a conclusive evidence of his betrayal.
Additionally, while you claimed that he switched side from the Legion because they didn't "make him a super high rank right away", this wasn't the case. Throughout book 3 ("The Sundering"), there was no description of Illidan being unsatisfied with the Legion's treatment. One would expect if that was true, we'd have gotten paragraphs depicting how annoyed he was, judging by Illidan's character back then - just like in book 2 ("The Demon Soul"). Then, we know that he already had his plan when he was stealing the Demon Soul - seeing that he unnaturally showed no reaction and just unhesitatingly gave the disc to Varo'then and by the time they went back to the Well, the book made it clear that his interest were against those of the Legion.
In summary, both WoTA triology and the Illidan book showed that he was infiltrating the Legion. He might have loved power, he might have had "contradictory thoughts", but there was no evidence of him crossed the line and decided to betray the NE.