A senior leader was sanctioned after allegedly 'twerking' in front of actor Martin Compston at an Edinburgh Castle event.