Small white worms could be maggots, although those are usually found when rabbits are living outside and flies lay eggs in their poop.
I would think that the wood pellets would be heat treated or sanitized somehow and that no insects would be coming out of it. You can pour out the bag onto some newspaper or a piece of plastic to see if there are any worms in it. If you are at all in doubt about what kind of worms these are, you can take a fecal sample from your rabbit to your vet to be checked out. Take several poops in. I found a rabbit on the street once and she had tapeworm, the first samples I took in didn’t show any, but I later pulled apart some droppings and then saw the worms which I took to the vet for confirmation and to get treatment for her. If you do find any more of those worms, you should put them in a ziploc bag or a jar and have your vet look at them. They should be able to identify the worms and tell you if your rabbit needs any treatment.