AFAIK it is not official that the Duke and Duchess of Cambridge should use their "Scottish" title while in Scotland. After the Act of Union in 1701 all titles created are in the Peerage of the Uk- there cannot be new creations under Scottish or English law.
Of course the title of "The Prince of Wales"as well as the "The Duke of Cornwall" have been a title in the peerage of England before that (so they are no Welsh or Cornish titles), just like "The Duke of Rothesay" has been a title of the peerage of Scotland.
Different letters patents rule how these titles are acquired by the heir to the throne and they are used traditionally like they were used before the Act of Union. Thus, in Scotland, the title of the heir of the Throne is "Duke of Rothesay" and "The Prince of Scotland" (another of Charles' titles) while on "English soil" (including Northern Ireland) he is The Prince of Wales, Duke of Cornwall as heir.
But - William's as well as the other titles of the Royal family are "British titles"- all created after the Union of both kingdoms, so are valid in either. It's just the papers who want William to be recognized as the heir of the heir of Scotland as well as of England (which included Wales and Northern Ireland).
Of course the title of "The Prince of Wales"as well as the "The Duke of Cornwall" have been a title in the peerage of England before that (so they are no Welsh or Cornish titles), just like "The Duke of Rothesay" has been a title of the peerage of Scotland.
Different letters patents rule how these titles are acquired by the heir to the throne and they are used traditionally like they were used before the Act of Union. Thus, in Scotland, the title of the heir of the Throne is "Duke of Rothesay" and "The Prince of Scotland" (another of Charles' titles) while on "English soil" (including Northern Ireland) he is The Prince of Wales, Duke of Cornwall as heir.
But - William's as well as the other titles of the Royal family are "British titles"- all created after the Union of both kingdoms, so are valid in either. It's just the papers who want William to be recognized as the heir of the heir of Scotland as well as of England (which included Wales and Northern Ireland).