I have always taken it that A
councilor would be under the CMO command, however, Picard utilised Deanna not as a councilor but as a Betazoid while on the bridge.
As such, I think she held a dual role on board, due to her unique abilities. Fulfilling a medical role [as we see her councilling numerous crewmen] and as an advisor [due to her unique, racial abilities]
Thus, I assume this unique dual role affords her privelages that other councillors would not have: like sitting on the Bridge. Where people sit isn't important, I'd assume Beverley still outranks her...but has no need to actually be on the bridge, unlike Troi.