Duolingo should DEFINITELY accept “a professor AT a university”.
Firstly it is the normal way to say it in English.
Secondly, the only possible nuance of difference is that “a professor AT a university” is more likely to mean that they do actually teach AT that particular university, whereas “ a professor IN a university” may just be an indication of location, not of job, status or tenure within that university. eg “the foreign spy knew only that his contact was a professor in a university somewhere in Britain, but was unaware of any specific details”. Or “the newspapers announced the death of a professor at a university nearby, but in fact it was the death of a professor IN a university nearby - he was visiting for a business meeting in the town, and happened to be staying in university accommodation when he was murdered in the dorm corridor on Campus. The Professor in question had no links whatsoever with the local university except via Booking.com.
I struggled to remember how to spell "oilthigh" and instead of marking me wrong it kept telling me I was typing in English (which I wasn't). I couldn't move on until I looked up the spelling in an online dictionary. I wonder what it is about "Ollamh ann an oiltighe" that looks like English?