CB Privacy is probably the only way to do this as it always allows the profile owner to see the tab/fields in addition to whatever privacy settings it's set to. You'd user moderator privacy controls to force a privacy level on the tab/fields. However the moderator tab privacy controls feature is bugged and needs the below quickfix.
www.joomlapolis.com/forum/153-professional-member-support/226433-solved-condition-to-show-based-on-userid-and-userid-of-connections#249003
An alternative could be to use CB Conditional and construct a Custom Value substitute that can give a value to condition against. Example condition as follows.
Field: Value
Value: [cb:if cb_profiletype="Student"]SHOW[/cb:if][cb:if user="#me" cb_profiletype="Teacher"]SHOW[/cb:if]
Operator: Equal To
Value: SHOW
The above would cause the word SHOW to be the value if the displayed user is a student or the viewing user is a teacher. If that matches then it'll display the tab. You can try using the viewaccesslevel IF substitution as well to test view access levels. Example as follows.
Value: [cb:if viewaccesslevel includes "3"]SHOW[/cb:if][cb:if user="#me" viewaccesslevel includes "6"]SHOW[/cb:if]
Note the 3 would be Student and the 6 would be Teacher (you'll need to adjust these, values supplied are just examples).