As I can best recall, Rittenhouse did not actually legally possess the weapon he was carrying. Setting aside whether someone who did legally possess a rifle could openly carry it on the streets of Kenosha during a civil unrest:
Rittenhouse was a minor (17).
Rittenhouse was a resident of Illinois who worked a part-time job in Wisconsin.
The rifle was a straw purchase by a friend of Rittenhouse and kept in Wisconsin.'
When these facts are strung together, Rittenhouse did not legally possess that weapon when he took it out in Kenosha that evening. There was an alternative path to possession that was claimed where Rittenhouse legally owned the gun in Illinois, but I think the first one was correct. Even on that alternative version, he would have not been able to legally transport that gun across the state line.
What Rittenhouse did in Kenosha posessing the rifle and patrolling prior to the shooting may not have been legal either, but I don't recall. (We all know he was acquitted for the charged shooting, I don't care to rehash it. I don't recall if there were any "gun charges" included in his indictment or not. They may have been omitted to keep things "clean" for the jury.)
In contrast Alex Pretti was, to the best of the reporting available, legally authorized to possess the gun on his person when the incident took place.