university level? i'm not sure there really is such a thing as inappropriate, everyone is an adult - get over it i'd say
At the college level, there's abuse of authority/position, and either party making moves for every reason beyond true intimacy (grades, reference letters, grants, etc etc etc)...
and then there's two adults who just happen to meet while in the student/instructor roles.
There is nothing wrong with two consenting adults, such as a student and instructor, from getting together.
Hell, would someone like the OP feel it's unwarranted for an instructor to have any kind of personal relationship with a student? I mean, to the point that, if they met in a bar and didn't realize who each other was or it slipped the student's mind (harder for a student to not recognize an instructor, true, but still possible), and they started dating... should they call it off once they realize the situation?
Insanity.
This isn't high school or younger where that's just beyond inappropriate, no matter what (even when of age, like most high school seniors, that's a big no-no at that level of education - you just cannot argue otherwise. Great for the students to score, on occasion... but it truly is inappropriate).
This is college, where everyone expects you to be a real-world adult, and except for the instructors who actually care, for the most part it's do what's expected, I don't give a damn if you don't, you simply get the justly-earned grade if that's the case.
As long as such a relationship is not, in any one way, specifically due to their roles (which means one party has a motive to everything), it should be treated like two adults who have found something of interest in each other.
And for this exact situation in the OP - even if it was casual flirting, it's more likely than not simply small talk. If the student is a young adult, I wouldn't doubt if there is at least a tiny bit of interest in the instructor (I sure as hell did for a few of my instructors), and they want to at least be on the casual small-talk level.
It also is very beneficial to students to at least participate in some small talk with professors, sexual interest or not. You really should want the professor to be able to *fondly* match your face to your name. In so many small ways, this can truly help.
Is it "wrong", on the level that everyone should simply be a name or number on the gradebooks, with zero bias for anything done? True. But it's reality, humans are humans, and since others know this is true, you should at least try to be on the same page.