Yes this is possible. You can use the REST API to delete a user from the conversation and then add a different user, either also using the REST API or using the JS SDK. Please do note that if a new user is added this user can also see all the chat history from before they were added.

You’ve successfully subscribed to TalkJS
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Your link has expired
Success! Check your email for magic link to sign-in.