Read David Swenson’s reply:
Substitute teaching can be a challenge, because students become very attached to their regular teacher. I substituted a lot when I was first teaching, and sometimes when the students saw that their regular teacher was not teaching that day, they would simply turn around and leave. Even when they stay, it is difficult for the substitute to have the same control as the regular teacher.
Having said that, when you substitute, you are in charge of the class. It is important to point out when a student is practicing in a way that is not conducive to his or her growth and well-being.
You must address the student directly. She may not know that there is anything wrong. By making general comments [to the whole class, often the student who needs to take heed of the advice thinks that it is directed toward someone else. It can be delicate to give advice directly, but it is part of the student/teacher relationship. You can deliver the advice in a compassionate way. Try keeping the student after class for a few minutes, or find a moment when you can speak to her privately.
However, if you are only substituting for a short time and you simply feel too uncomfortable to address the student, you could wait for the regular teacher to return and mention the situation to her.