You can apply but have to meet the conditions, one of which is to spend a certain % of gdp on Defence. Most Nato countries haven't been meeting this target for years, which is one reason the US can get a bit miffed about Nato; they can perceive themselves as doing the heavy lifting defence wise whilst Europe spends its money on other stuff.
Every country has a veto I believe. If the US says Ukraine membership is off the table, it's off the table.
Add on: It's supposed to be 2% of gdp on defence. Most members aren't meeting that figure.
View attachment 7318
View attachment 7319