The following presumes the rice is in the form of a grain/seed - not a plant.
With a photocell you would expect to see some noise or on/off resulting from the grains passing by. With some experimentation you might actually be able to derive some sense of the rate of flow - along with the indication that there is flow (changing signal) or not flow (no change).
Sound or ultrasound might also work. For the sake of recognition from other noises a transducer could emit a pulse that might be reflected or passed thru a tube, chamber, etc. A receiver (or the transducer in 'listen' mode) would hear the return. One would expect returns to change as material was in the way or not.
I grew up on a small farm. On one planter that I had to observe was such that I could hear the grain passing thru this relatively light weight metal tube. One might characterise similar 'unclogged' sounds and 'clogged' sounds. Those sounds would have to be sorted from the rest of the noise. On farm equipment the sound of it used to tell much of the story of how it was operating, whether it was full or empty, etc.