Scottish rules about flying flags (I don't know what is involved in England and Wales) -
"The only flags that should be flown from Scottish Government buildings in Scotland are the Saltire, the Union flag, the European flag (Europe Day only), the Red Ensign (Merchant Navy Day only) the Commonwealth flag (Commonwealth Day only), The Armed Forces Day flag (Armed Forces Day only) and the Royal Standard at St Andrew’s House (by Special Command or Royal Assent). Other flags, including those of other nations, should not be flown from Scottish Government buildings."
BUT
"Local authority buildings and schools are not affected by these guidelines, the matter of flag flying remaining one for individual local authorities to determine. These rules and dates are not binding on any other public institutions, or members of the public. With the exception of the Royal Standard, which may not be flown without permission from The Queen, these other groups may fly any flag at any time, no weight of public authority being implied behind such flag flying."
http://www.scotland.gov.uk/Topics/People/royal-ceremonial/Flag-Flying-Guidance-2012
So, as the Edinburgh council building is a local authority building, not a Scottish Government building, they are within the law to fly whatever flag the want (The Jolly Roger?)