In the scenario you describes above, I think it is more likely that Labour would agree to attempt to turn the UK into a federal country rather than give SNP the referendum they want especially considering the polling on Scottish independence is still neck-and-neck and Labour definitely do not want to be held responsible for any potential breakup of the UK. On the other hand, I could also see Labour agreeing to the independence referendum and then working with the Tories to threaten Scotland with partition of its territory in the event the Yes side wins pointing to France's decision to partition Comoros and Canada's threat to partition Quebec as legal precedents.
However, I highly doubt the scenario you are proposing will actually happen. Most of the recent polls show that Labour will win at least a comfortable majority in the next general election. Sure, a lot could change in the next 2 years but Keir Starmer has been working hard to repair Labour's image among voters by moving to the center and presenting himself as a viable alternative to the Tories. Starmer has purged Jeremy Corbyn and much of the far-left from the party while keeping MPs who still support Corbyn's reinstatement on the backbench.   The Labour Party Conference last September featured a tribute to the late Queen and an uninterrupted singing of God Save the King with the national flag on the background. Also, the Labour's position on immigration and asylum seekers is no longer different from that of the Tories. With all this, I am sure Labour is still very much on their way to a historic landslide victory.