The World Rally Championship will return to the UK for the first time in eight years when the north-east of Scotland hosts a round in 2027.