Like TNG, it depends on the situation. Most likely, Bones is truly third-in-command based purely on rank, but it's impractical and not in the ship's best interests for him to take the bridge when Captain Kirk and Spock beam out. Likewise for Scotty as well. Like on the Enterprise-D, Crusher technically has the same rank as Riker, but it's not practical for her to command the bridge unless something very serious happens (i.e. a Borg commando war).
Based on the movie, it seems Sulu was third in command on the bridge. I don't see them taking Scotty out of engineering for that, though he likely outranks Sulu.
It's hard to draw a parallel to our current military world, as the captain of a navy destroyer doesn't leave the ship on a regular basis during a mission to go nail some chick with a tail.