That scene only makes Riker's thoughts about promoting Worf over Data to first officer somewhat strange. He considers Data, but Worf was definitely a consideration.
Besides rank, position, posting, and division, there are also seems to be some differences between commanding, having authority, being given command, and next in line duty officer.
As strange as it sounds, rank doesn't always give you authority, a lower ranking officer from another division may get command over another, and being given command doesn't always mean command over everyone.
At least from what I observed on the show.
So Worf, lower ranking officer from security, is given command of the bridge or made acting first officer and yet must acknowledge Geordi as a senior officer.
However from the 1st season, Geordi, in command division is outranked by Logan the engineer, but refuses his suggestions and counter orders him.
It seems like command is more of a duty, than simply giving orders and enjoying the authority-like being a security or engineering officer.