Rex tells Ahsoka he could've ordered her to bring him on the mission, to which Ahsoka replies he doesn't outrank her anymore. Rex never outranked Ahsoka. She was a commander in the Republic army while he was a commander. He was later promoted to commander at the very end of the war, giving them an equal ranking.