It might be possible, but I can’t say I will know all of what would be involved.
First off, you’d need to relate students to parents.
second you’d need to have a courses/classes post type that was is somehow related to teachers and students and these user fields could be restricted to a certain user role.