some professors said it's perfectly OK to mix C and C++. Others would give an automatic "F" grade if stdio.h or any standard C library was included in a C++ program
I'd chalk that up to different goals. If your goal as a professor is to get your students to learn C++, there can be some value in forcing them (through grades) to accomplish the task only using C++. A professor like that could compare this to another student turning in an assignment that was simply a C++ shell that executed in-line assembly code. It might work, but it doesn't teach the student very much about C++.

Contrast that goal with the real world, where you're trying to get something done. When that's your goal, you don't care about learning C++, you just want to accomplish your objective. With that goal, using C (or assembler or anything else) is most likely fine, as long as there are good reasons for doing what you did. I'm sure there are plenty of exceptions to this--for example, if a company is "standardized" on a particular language, they might want you to use only that language for long-term maintainability, even if you would prefer to use something else. In the grand scheme of things though, using a C library within a C++ program is probably not a big deal.