Well, first of all the whole idea of a centralized modern police force is a modern idea. You may be surprised to know that it originated as recently as the early nineteenth century, in the UK and Paris. Before then, there were local watchmen and constables but not organized country wide. The first municipal police force in the world goes back to Louis XIV in the seventeenth century. And before then, I’m not expert on the details :). No detectives, that also is a modern idea, in its modern form started in the nineteenth century. There were legal systems, those are very ancient. If you felt you were dealt with unjustly you might take your case to a powerful local lord or the king or queen, or you might just try to pursue it yourself in some way. China had its system of Prefects responsible for each district. I’m not sure how it all worked back then, but nothing resembling a modern police force for sure.
History of law enforcement in the United Kingdom
Early police in the UK - the first police were called Peelers, not Bobbies - that came later. Sir Robert Peel and his 'bobbies'
Also they are not needed, even don’t make much sense for a small tribe of say a dozen or a few dozen people. It wouldn’t make a lot of sense to have a full time policeman. Instead perhaps you’d go to the tribal chief for justice. People to this day still live in small tribes in the forests, and they don’t have police. So police are needed because we have become a large society where people don’t know each other, and even then, large societies have operated in the past with nothing resembling a modern police force.
So society wouldn’t fall apart without police. But it would probably be a choatic interim period and many things would become more difficult.
I’m not expert in this, just thought I’d add this as there are some very incorrect answers here that suggest society can’t function at all without police. It certainly can and people wouldn’t have to go amok and start lynching everyone just because there are no police to keep them in check. But it might be a different matter if people who are used to police being there all the time suddenly find there aren’t any, until they develop new conventions. Eventually probably they would reinvent the police seems to me.
See also the wikipedia article on Police has a long history section that looks good: Police