No in 2014 they had a temporary permission from Westminster to hold an independance referendum
https://en.m.wikipedia.org/wiki/Scottish_independence_referendum,_2014
The power is held at Westminster on anything that effects the constitution and union.
Scotland cannot hold a second referendum on independance without approval from Westmister.
Which is why in one of my links Nicola Sturgeon says she thought it unlikely Westmister would refuse.
Well they can.
Absolute rubbish.
The Holyrood government can choose to hold a referendum on whatever it like in Scotland. What it cannot do, necessarily is deliver on the result of that referendum because it only has authority to change actually enact changes in certain areas.
So, for example, Holyrood could decide to hold a referendum on whether Scotland should ditch the monarchy and become a republic. Westminster cannot stop them, but they do not have the authority to actually make that happen - that power rests in Westminster. So 99% of the people of Scotland could vote for a republic and Westminster can shrug its shoulders and say - tough, not your decision.
And that was the case for IndyRef - the power to enact Scottish independence rested entirely in Westminster. But what Westminster did do was to take a decision to recognise the referendum, in other words to accept its findings - but that was its choice.
So on IndyRef 2 - Westminster cannot stop it happening, but it can simply state that it refuses to recognise it, therefore ignoring its findings whether pro independence or anti independence.