Configure index from outside Algolia

Is it possible to allow a user to define the ranking formula without touching the Algolia admin interface.

i.e. develop a custom interface that can control Algolia via the API?

Yes you can set the ranking parameter from any api client. See ranking API parameter | Algolia