Not really. The army was (and in some places, sadly still is) called in to suppress civil unrest from time to time, but regular police work was never their job. They were basically part-time riot cops with lethal weapons. That didn’t mean you could stop a random soldier and say “excuse me sir, this guy stole from me or whatever, please investigate and arrest him and take him to a judge”. Exception: armies were often sent to capture and/or kill rural bandits, but I consider that a special case. Rural banditry is a category on its own, very complicated, and these military operations often played out like civil war more than police work.
The classic example of policing without police is the medieval English hue and cry – the expectation was that when a crime is committed, the victim will cry out or someone else will spot it and cry out, and people will apprehend the criminals and bring them to justice. I say medieval, but it lasted well into the modern period. There’s nothing even vaguely resembling a professional police force in England before 1750, and it will take a long while before that evolves to what is now recognisable as a professional police force. (Which in turn will spread over many parts of the world, while another large part of the world will copy or inherit the Napoleonic model. I mean, it’s all very very recent, a 19th century thing.)
Now, and this may cause some understandable confusion, in many places (England included) there are offices that seem to perform some police functions. But they don’t constitute a police force. Sometimes their jurisdiction is tiny (a single village, or a few blocks in the city) and they have no coordination with colleagues elsewhere, sometimes their jurisdiction is larger and they can’t possibly keep track of what’s going on, sometimes they do patrols in their spare time without pay and still need to work for a living so please don’t expect much of them, sometimes they’re strictly nightwatchmen and no one’s there to “fight crime” during the day, sometimes they’re contractors who run a protection racket for all intents and purposes, sometimes they hold administrative positions and may or may not form a posse (that generally ends up being another gang) on their own initiative, sometimes they’re the armed guards of a specific person and will only “fight crime” against said specific person and their family and estate, and so on.
And even when you have professionals, people paid by the state to “keep the peace”, they’re often no more than intermediaries for the “hue and cry” process: the neighbours caught the pickpocket and brought him to the constable, the constable brought him to the judge, the judge sentenced him to hang, and the hangman pulled the rope. So who’s the criminal? A question for the ages.
So in any case, rule of thumb: when you read about sheriffs and constables and policemen (whether these are the actual terms or the English translations of offices from somewhere else in the world), if it’s 18th century or earlier, it’s NOT police as we know it today. It’s something else, less powerful, not centralised, with limited scope and duties, and often ENTIRELY optional.