Walking into a class with used gear with unknown history is problematic.
Yes
If there's a gear issue, the instructor has to devote time to that, neglecting the rest of the class. If the student is injured, then there's a liability issue.
Less liability than if they have your rental gear or gear you sold them, that is a simply not true thing the dive industry says
Students may be allowed to use their gear if it passes a safety check. But this is one reason most shops provide rental gear to OW students.