Even if the answer of fdb is correct, here just a quote from a book on إعراب القرآن I'rab al-Quran:
الواو استئنافيّة (اضرب لهم مثل) مرّ إعرابها، (الحياة) مضاف إليه مجرور (الدنيا) نعت للحياة مجرور وعلامة الجرّ الكسرة المقدرة على الألف (source)
So yes it is indeed a na'at نعت which qualifies الحياة (the life or this life) as دنيا
(related to دونية) with lesser value (inferior) so it's clearly an adjective! If you are interested in the 'Irab of اضرب لهم مثل -which in my quote is only quoted as a side note- you can refer to the 'irab of verse 32 in the same surah (see here).
So the issue is that an alif الف at the end as in the case of (الدنيا) can't (physically) have a diacritic on it, which means that this sound is "estimated" and does not appear nor would be applied on the letter.
Further more the lecturer is wrong as an adjective (نعت) of a word/noun that is نكرة (not having ال at the beginning or indetermined) can't be معرفة (having ال at the beginning or determined) so by no means الدنيا can be for مَثَلَ. (See also on Arabic wikipedia)