Scottish MP's can vote in a referendum in Scotland on devolution, and can then come back to Westminster and vote against us having a referendum on the EU.
Well neither referendum has been called so NO they can't.
If they were called, then the scenario you outline could happen. In both cases the principle of 'self determination' applies. If the Scots got Independence from Westminster, then they would no longer have the vote there.