At Christmas an ugly sweater is a unpleasant jumper, where, as has been mentioned, one of Andrew's defences against accusations of noncery is that he was incapable of sweating because of the Falklands War.
It’s an unpleasant rather than a unpleasant. The way to remember which to use is if the following word starts with a vowel sound then use an, else use a. It’s key to note that it’s vowel sound and not explicitly a vowel.