The companion app uses the Android framework for commissioning indeed, which reads the internal Thread Network data store. However, that said, it is possible to add our own Thread network to the datastore. Make sure to sync the Thread credentials. Essentially follow the steps outlined here: Thread - Home Assistant (specifically the Settings > Companion app > Troubleshooting, then select Sync Thread credentials step).
For that to work you’d need at the very least the set_thread_dataset websocket command. There is also the built-in web interface on the Python Matter Server which allows to do “local” commissioning. See also Matter Pairing/Commissioning hints.