According to police, the incident happened around 6:45 a.m. Monday in the area of D Street and Imperial Avenue.
The suspect, Joseph Jeffrey Moore, fled the scene before officers arrived, but they were able to track him down through witness information.
Moore, who police say is a registered sex offender, was arrested in the 12000 block of Sixth Street in Rancho Cucamonga. He was booked for indecent exposure, but has since been released on bail.
Detectives believe there may be more victims or witnesses. They say Moore has been seen driving a tan 2003 extra-cab Chevrolet Silverado with a bug deflector across the hood. He also has access to a 2013 white Honda Civic, a gray Toyota 4Runner, and a gray Mini Cooper.
Anyone with information was asked to call the Ontario Police Department at 909-986-6711.