Possible to use socket.io to connect to another server?

Yes. As long as you only connect to the host website on secure connections (WSS/TLS) you can use it however you like (as long as it doesn’t break any other TOS, like directly transmitting HTML).