Flag officer has 2 different meanings across 1 category:
Noun
a senior naval officer above the rank of captain
A naval officer with the rank of rear admiral or above. Such officers are entitled to fly a personal flag, especially on the flagship.