By what law, agreement or convention would Scotland be "entitled" to this?
The Vienna Convention of 1983 on the succession of states sets out how assets and liabilities of a state which divides into two or more new states should be apportioned between the new states.
Google is my friend.