An easy way to do this is to use the Signal API: Send text messages - OpenVidu Docs
In fact, this is the way the OpenVidu Call app do this: OpenviduCall. If you connect to a video call, you can see that users are able to change their nickname by clicking on it.
What is happening under the hood is that the application sends a signal to all other users to notify them. New users connecting to the session also receive the udpated nickname, as the user who has modified it also sends the signal to them when receiving their connectionCreated event.