Friendship with Professor okay?
In my opinion professors are normal people and can have friends as everyone else, as long as it does not affect your grades and how you are treated in the classroom. I used to give classes where I taught my friend who I started studies at the same university with (he took a few gap years...). In the classroom and when grading exams and homeworks I treated him exactly as other students.

There is also a possibility that your institution's code of conduct has regulations pertaining to this situation. Nevertheless, they should be more of concern for your professor than you.