Wiki excerpt: "Article Five of the treaty states that if an armed attack occurs against one of the member states, it should be considered an attack against all members, and other members shall assist the attacked member, with armed forces
if necessary."
If? If? ... how could it not be necessary?
But article 5 has never been tested ...
US membership is a factor ... no NATO country has been invaded so this all conjecture, treaty or not. Many nations, including the US, have broken treaties at will. Putin is getting grief from the oligarchs but he has tested the boundaries with NATO and gained Crimea and the bluffs overlooking Georgia. The next Russian leader or Putin just dissolves/bends the Russian parliament and rules by fiat, will continue to apply pressure in Ukraine-Estonia-Latvia-Lithuania with their Russian minorities. He's found his raison d'etre and he's going to ride that pony for all it's worth until someone stops him.