You can't do this without using a system role, because you would have to create a new role preventing editing of the profile and apply this to the selected users at the system level (because your profile goes with you throughout the system) But they would still have their student/teacher role within courses too. See Roles FAQ How can I prevent a user from editing their own profile?
Roles and permissions
Allow/prevent editing own profile without system roles
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.