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.
The Queen held military rank as colonel in chief of several regiments, and as such was entitled to the salute. If Harry were a serving officer, he would have been entitled to the say. But he isn’t.