Actress Emma Thompson shared a cheeky exchange with Prince William during her dame hood ceremony at Buckingham Palace