As has been previously stated, theoretically it's not allowed. When I was still serving (not in the US military, obviously) we had an annual ball that we were obliged to wear mess dress to attend. I always used to ask for permission to be allowed to wear my formal THCD on that evening. Whether the permission was granted or refused depended largely on the personality of the CO at the time. Permission was more often granted than refused, though.