In my experience the worm will stay hidden, while it's true feeders should be removed and may bother your gecko one worm isn't a big deal and the beetles aren't terribly aggressive. If you end up with a beetle your leo may try to hunt it but will find it very unappetizing, I don't know if the beetles can bite hard but they can definitely stink!
The worm is pretty harmless and would take time to pupate, you might be able to catch it by leaving a chunk of carrot behind a rock (or anywhere you'll leo won't get to it).
Either catch it while it's eating or replace it's food (which will also distract it from your leo) until it pupates, then you can find the larva while cleaning the tank.