I stand corrected. The AFI says that retirees may where the uniform:
at occasions of military ceremonies, military funerals, weddings, memorial services, and inaugurals
patriotic parades on national holidays, other military parades or ceremonies in which any active or Reserve US military unit is taking part
at educational institutions when engaged in giving military instructions or responsible for military discipline
at social or other functions when the invitation has been influenced by the member's active military service
I assume the Navy rules are similar.