You mean a function similar to what you might find in Skype or Zoom - when a contact joins a meeting the system can play a notification sound?
I do not believe the standard Moodle Chat activity has this capability.
But did you know you can send a sound to other people by hitting the "beep" link next to their name?
So if your users are told this, then when they enter the Chat room they can beep, and the teacher and others will know there is someone there
It's not an exact solution for your question, but it might be useful?