When onboard the USS Cole, the commanding officer (CO) has the rank of Commander. At one point, the 1-MC (ships PA) calls for him by addressing him by that rank. However, a CO of a navy ship is ALWAYS addressed as "Captain" regardless of his navy pay grade.
The ambassador addresses a US Navy commander as colonel.