Liz Truss recently met the Queen in her Scottish residence Balmoral to be invited to form a government as Prime Minister. Usually this meeting would be performed in Buckingham Palace in London, but on occasion has been performed elsewhere according to The Times:
After the sudden resignation of Sir Henry Campbell-Bannerman in 1908, his replacement Herbert Asquith was forced to travel to Biarritz where the Queen’s great-grandfather King Edward VII was on holiday at the time.
Other news reports seem to suggest that appointing a PM in Scotland would be unprecedented - the Independent for example calls it a "historic first" and quotes "insiders" saying "it is incredibly rare for any monarch not to appoint a new prime minister outside Buckingham Palace or Windsor Castle".
Has a Prime Minister ever been appointed in Scotland before though, either at Balmoral or elsewhere?