Never "flush" anything. You dont want non native species getting into your local waters. With that said, that looks like a bristleworm, which is reef safe (in reasonable numbers), so put it back in the tank.
Also, you do not want to touch it, as bristleworms will leave bristles in your hand/fingers (they hurt, but not life threatening/dangerous).