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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users