> Scotland can't leave the UK and remain in the EU. They would have to become independent and then begin the application process, which could take years.
There is precedence for the opposite. That said, Scotland on its own would have to demonstrate that it can be a member, but it's far from clear that they would have to reapply. Repplying would almost certainly fail because Madrid would block it.