you can try many different ways to get it out. you can try the bottle trap method, but i dont know how big the worm is and if it will fit in the bottle.
i have heard of the 'panty hose' method where you put some food in a panty hose. supposedly, the worm's bristles will get caught in the panty hose.
you can also try stunning it. go down in the middle of the night, and if you see it. shine a flashlight right at it. you can then proceed to try to get it out with some tongs.
i hope this helps, it really sucks to have that in a tank