You can mock a WebSocket connection via Firebase. Since there is no subscription Firebase option with the build in Firebase query tool you'd have to do it a little different. The only want to accomplish this currently is with a Custom Component (Firebase realtime updates - #13 by joeBumbaca). Within that you can set up your subscription to your Firestore collection and you will be update and receive data updates in real-time. This is all done within the JS/TS repository that is made for the application.
The pitfall with this is that the subscription data is only available within the Custom Component itself. I'm sure you could hook up a way to store it within Retool and fetch it elsewhere but that is the workaround I have been using in the application I'm helping build.