They're talking nonsense. There is sometimes talk of Spain veto-ing Scottish accession to the EU as a sort of warning to Catalonians (who closely identify with the Scottish indy movement), but realistically Scotland is aligned with the EU acquis so there's no really go reason not to. They won't be able to rejoin on the same terms as the UK were in, but that's something that was lost forever after Brexit.
Also curious why Scotland is not able to apply if it leaves the UK? Thanks in advance for the info.