Both are correct. The first one sounds natural. The second sounds a little bit overprecise, formal, or "stilted."
One reason why the first one is appropriate relates to meaning, not grammar. We know from our general knowledge that "hat and scarf" go together, because they would be a common combination in cold weather. So it is natural to think of it as "a hat-and-scarf." Similarly, we might say "a cup and saucer," or "a bow and arrow," or "a pencil and paper."
If they were not a natural combination, it would be more likely that we would repeat the article. "She was carrying a handbag and an umbrella;" "I'll have a hamburger and a coke;" "the house had a red roof and a long driveway."