What type of candy, one with nut meats or fruit? A number of small worms or weevils can innocently make their way into the food chain. Sailors used to have a saying about weevils which sometimes infested the stored flour, "You feed them, you eat them". Foods are inspected at different points along the line, but on occasion, one slips through. It is far easier inspecting each nut you crack rather than huge bags of nuts used in candy making. A maggot's life span is different than that of a weevil or worm infecting a nut meat or fruit. It sounds as if you did not injest a maggot but rather a weevil or worm. When I ingested the worm in the grape I didn't see it, I noticed an unexpected "protein" taste and removed it, knowing it was not going to cause any harm, my psychological attitude protected me. I have learned to make a joke out of it. Contact the candy maker and provide the package information and sample if you still have it so they can investigate and see if their suppliers are providing contaminated shipments. Most likely the candy you ate the other day was made some time ago as chocolate in candy is usually aged. Most likely either the store or candy maker will provide some compensation.
Was it a Tequila flavoured lollipop, which containd a real edible worm?