To be ruled by AI I think requires the AI to be in some sense conscious, to have some notion of I and be able to form its own values and goals. Otherwise the ruler is whoever imposes/creates the AI, just in a once removed sort of way.
On the other hand to be ruled by algorithms: we already are. That's basically what the "rule of law" means - it's the (actually fairly desirable) right to be ruled and governed by a set of (in principle) knowable algorithms, which creates a fairer society than one ruled directly by human dictat.
What's being depicted (and criticised) in the film I think are mostly two things:
1. Some notion of social credit, where desirable actions are being rewarded with some arbitrary tokens and undesirable actions are being punished by these tokens being taken away. In some way this is already the case with capitalism (where desirable actions are work/investment and tokens are money), so I think some notion where what is societally desirable being more broadly evaluated isn't necessarily that terrible.
2. Persistent surveillance. This makes the above notions of social credit a bit more challenging since in some ways it makes participation in the social ranking system less voluntary (although how voluntary is work/making money in our own system is pretty debatable). Also it's creepy and dangerous in a number of other ways.
Neither of these things really require AI or algorithms to be bad, but AI tech really helps with the scalability of these solutions and therefore their applicability to real world societies. But it doesn't really seem like you are critiquing things for which AI would actually be bad as such (such as bias in training, value of compassion over justice, etc)