I know that's one theory, but there was no serious movement to vote the Ukraine into NATO, partly because it was one of the most corrupt nations in Europe, and the NATO members did not want to provoke a war minded Russia. Pres. George W. Bush floated the idea of Ukranian membership in 2008 but that was quickly nixed by France and Germany.In 2015 Putin and the leaders of basically every county signed the Minsk Agreement the help bring talks and peace to the Ukraine situation.
But only Putin /Russia was following the agreement. Every one else just continued to flaggrently violate the agreement.
For 8 years Putin stressed his concerns to the US and EU nations many times but was ignored.
Finally, after one last final warning about not making Ukraine a Nato member, and was once again ignored. Putin felt he had no chose but to take matters into his own hand, and invade Ukraine in order to resolve the situation and protect Russia.
I think an impatient Putin used NATO as an excuse to invade after he successfully annexed part of Georgia without any serious backlash also in 2008.