It is possible to limit teachers' gradebook access to only the students they share a group membership with by enabling grade_report_showgroups. Once this is done, a teacher only sees their groups in Grader Report.
However, the User Report does not have this option, meaning that a teacher can view grades for any student in the course.