First, you have to make a distinction. Is the worm in your eye or just around you eye, such as under the eyelid? They are totally different things. Also, an optometrist works to calculate your eye degree and make corresponding eyeglasses for you. It is not their job to identify and treat eye worms, which is the duty of ophthalmologists.
Do you live in the USA? Eye worms in developed countries are very uncommon. The most common eye worm, loa loa, is mainly present in the Africa. The following is an image of intraocular loa loa, which can cause blindness.