Agreed. While the sentence sounds a bit awkward, it is NOT grammatically incorrect. "I have a dress for evening" is a statement of ownership of an evening gown (Again, it is slightly awkward, and would probably not be used except in the most specific of circumstances where one is required to dress different ways throughout the day, like in olden times. However, it is not grammatically incorrect. )
Conversely, "I have a dress for the evening" is an acknowledgement that you do in fact have a dress for this evening's festivities, etc.
I googled around and I believe I found the answer. It is because "da" is used to describe what an object is used for. This is a dress for the evening not made of the evening (which would make no sense). Whereas when we say "una bottiglia di vino" we are NOT saying the bottle is FOR wine, we are saying it's a bottle OF WINE.
From a website regarding "da": "4) To indicate purpose, ending (fine):
Carte da gioco - Playing cards
Sala da pranzo - Lunchroom
Spazzolino da denti - Toothbrush
Abito da sera - Evening dress"
I found this a helpful due to its simplicity: https://www.youtube.com/watch?v=0D7ZpAGuT_s
For a very complex explanation, check out Manu's video here: https://www.italymadeeasy.com/live-italian-lesson-018/
Also, keep in mind that their are two prepositions here - da and di. De is just a variant of Di as can be seen in this chart: https://myitalianlessons.co.uk/list-of-italian-articulated-prepositions/
My answer was, "I have evening dress." It was not accepted.
A woman would say, "I have an evening dress," but I have not heard a man say that. We say, "I have evening dress." A woman's evening dress is one garment. Men's evening dress is trousers, jacket, shirt, and possibly a cummerbund.