He is not currently an officer, as all military rank was lost when he ceased being a working royal.
Queen Elizabeth II was piped aboard the USS Constitution and given a 21 gun salute, but she was head of state. I don’t see how he merits this treatment at all. Not even in uniform.