Rice with worm and possibly their eggs
I haven't had that happen since the 1980's.  Sound like the Flour Moth.
Freezing Rice or Flour for 3-4 days will kill the eggs.
I usually freeze local flour/rice for a few days so that I don't have to deal with any potential problem.
If you have pantry moths, or other moths that have hatched, you may need to take extra measures to get rid of them.  Once they start flying, they can get into any opened grain-food.