No doubt that officer is indeed a Navy Captain, hastily promoted from Captain of his own vessel to serve on Executor (the Imprial flagship) due to the power vacuum in the chain of command created by Vader's habit of strangling everyone. If I recall my boyscout days, an officer with the rank of 'Captain' serving on a ship he is not the captain of, would be addressed as 'Commodore' (I think).
(An army or marine captain aboard a ship would be addressed as 'Major,' a rank higher than they hold, to avoid confusion with the ship captain as well).
The rank of Commodore has been in and out of favor in the US for 100 years. Commodores were senior U.S. Navy Captains who commanded squadrons of more than one vessel or functional air wings or air groups that were not part of a carrier air wing or air group. Now doesn't that sound military. There was so much confusion regarding Captains of certain types of squadrons that held the temporary title of Commodore that it was dropped again in only a few months to the current rank of Rear Admiral. However, the Navy still uses it as a title for those in charge of groups of ships or submarines organized into squadrons, air wings or air groups of aviation squadrons.
In the Royal Navy, it is above Captain and below Rear Admiral.
However, any officer in command of a ship is addressed as Captain. For example, a Lt would command a WWII p.t. boat, but be addressed as Captain. A flag officer (Admiral, or other) aboard a ship would still have a Captain in charge of the ship, and all orders and the chain of command would flow through the Captain, as a courtesy to him.
And I'm sure I missed something.