Yup - if we didn't accept Finland and Sweden into NATO then their only option to prevent a Russian invasion would be to develop nukes and aim them at St. Petersburg.
Sweden had an atomic bomb program which was dropped in the 1970s after assurances from the US to extend its “nuclear umbrella” to protect Sweden.
One big reason Sweden jumped into NATO now is that the Swedish military is, not exactly a shadow of its former self, but very small.
If Sweden would have had an equivalent of the military power it had in say, 1991, I doubt a NATO application would have been made, or at least not as hastily.