Yes you can study Neuroscience then do a graduate entry medicine course, or a standard entry medicine course as a graduate, before embarking on neurological surgery training after foundation training.
However you can equally just apply to a typical undergraduate medicine course, do your intercalated year in neuroscience/neurobiology/neurophysiology/neurology etc, and then continue in that vein. It's not too uncommon for neurosurgeon trainees to do a masters/MD/PhD during the latter stage of their training as well - this can sometimes be done partially or wholly within the training programme itself and not extend the training period, depending on exactly what you study/research and how the training is structured - this varies between deaneries and posts as I understand, although I think usually you'll spend at least one year writing the thesis outside of clinical commitments for MDs/PhDs.
From a finance perspective it's much better to in the first instance pursue the PMQ (primary medical qualification). This will usually be sufficient to pursue a masters or research programme in neuroscience in itself anyway - you needn't do a second undergraduate course in the area. Funding for a second undergraduate degree (including GEM) is based on whether it is an ELQ (equivalent or lower qualification) - not whether you received funding before hand. Even if you did a tuition free BSc/MA in Scotland, you would still not receive further funding beyond the current arrangements available to all home students (I believe this is maintenance loan for the duration of the non-clinical phase, and NHS funding for the clinical phase if you weren't previously on an NHS funded course - if you were I think it gets more complicated and I couldn't advise).
From a career perspective it's usually better to do it this way around as well - neurosurgery training is about 8 years after the 2 year foundation training - this is 10 years to complete your post-graduate medical training. You will need to do at minimum a 5 year PMQ before this, and as NS is very competitive it's highly beneficial to do an intercalated year as well - bringing it to 6. This is then 16 years before doing ANY OTHER degrees or so on. If you go for GEM (graduate entry medicine), it's at minimum 17 years and potentially up to 19 (if you do a 4 year MSci then a 5 year PMQ instead of accelerated GEM course) to finally be fully qualified.