This kind of small distance detection is simple with an IR led and IR Sensitive Receptor/Photodiode. In fact, it's so common, that almost everyone has used one at some point. They are found in computer mice with trackballs or scroll wheels.
The light emitters and photo detectors form a basic optical encoder. The detector changes its output when the light gets blocked and unblocked. And by counting how often/fast it changes, it could even tell you the speed of something. Or if you know the speed (of say the conveyor belt), you can use the amount of time it takes for the sensor to change to tell how long a rock on the belt is (Distance = Speed x Time)
As you can see in the picture, the distance between the two parts is very very small, maybe 0.1"/0.254 cm. These can work at 1cm no problem. You could mount them across the belt (Sensor changes when the line of sight is blocked), or if needed, angled on the same side. (Sensor changes when something reflects the light)