It's such a strange thing for him to do. Spot you in the street. Approach you after the history of police involvement and non molestation etc, and he comes up to you to talk about something someone apparently said to him two years ago.
It just shows how deluded he is and how he is performing pathetic mental gymnastics in order to paint himself as a victim.
You know him better then us OP. Was he the type to twist or exaggerate? The swearing on his familys graves is so dramatic it gives me that impression. The fact that anyone has to swear on a grave suggests that they are used to making unbelievable claims and trying to back them up with emotional appeals.
What MAY have happened and seems plausible is that the officer advised him to stay away from you, or similar, but in a completely neutral way to keep you seperate and not escalate the situation while the investigation was happening. The ex could, after two years have twisted that in his own head as some confirmation that the police thought YOU had done something wrong. It's the only way he can preserve the image of himself.
It's pathetic from him that's he is still so fixated on making you the bad guy after all this time.
As pp have already communicated, it's unhealthy to spend any time on this deluded, violent, lying abuser, although I appreciate it's not as easy as saying it.