Is it safe to eat apples with apple maggot trails?
If you can get past the ick-factor of finding an occasional worm, they are perfectly safe. Some people make applesauce or cider out of worm-ridden apples. But there is no reason they can't be eaten raw. The worms will not survive the acid drenching they'd get in your stomach.
However, I'll add a couple of warnings. If the fruit is too far gone, or has dropped to the ground, I'd not eat it. The maggots might not make you sick, but bacteria in the rotting fruit, or something that entered the apple on the ground might. Furthermore, apple maggot larvae eventually turn the flesh mushy and unpalatable. And the fruit drops to the ground prematurely, before fully ripening.