Well - COB's can be like that some times. They have to maintain discipline and sometimes mistake innovation for "flipping the bird". Perhaps he thought the sailor was trying to make a joke or being impudent rather than expressing an actual preference for kilts. I wear a kilt in to my ship every day as well and I took some razzing initially. Of course, as the Exec, I was somewhat immune to it. ALso, my Coxn (the Canadian equvilent to a COB) is named MacUisdin and he also wears a kilt every day so the sailors tend to keep their mouth shut.
I think a chat with his divisional PO or officer who can then go to the COB and set the record straight might be in order. I would hold off on the grievence for a bit to try the internal route. Might let the COB save some face when he is forced to back down. In the long run that might make for a better long term working relationship.