Although Scotland has its own legal system, which differs from England and Wales, it is worth bearing in mind that you need to adhere to terms in your Deeds and the local planning policy.
Your Deeds (HMLR office copies) may contain covenants (conditions) regarding things you cannot build. Your office copies can be purchased online via HM Land Registry. Your local planning policy will also be online. Both can be googled.
Breaching these covenants, and/or planning policy, won’t end well.