The EU has not yet set a precedent for allowing breakaway states into full membership, so it's far from a given that an independent Scotland would be able to rejoin the EU.
Scotland is of enormous strategic importance due to its location relative to Russia's naval ports. An independent Scotland with no other backing would have minimal resources to monitor and deter Russian naval activity.
The precedent is now the promise to allow Ukraine into the EU.
I note that if you're looking for a weakly defended EU country reachable from the North Atlantic and quietly relying on the UK defence umbrella without admitting it, Ireland is already there.