Examine it closely. From the blurry photo it appears that you may have a species of caddis (caddis fly or Trichoptera) and not a "worm". The pieces of leaf look like its case (or cocoon, if you will) but it is hard to be sure without a better photo. If it is some form of caddis then half the people on this site will tell you to kill it immediately because it might turn into a (fill in the blank with whatever strongly held personal theory they have) and ravage your tank. The other half will sigh and wonder why we always have to kill every organism in our tanks that was not purchased at great expense (:-). Personally, I'd use google and try and ID it. Since there are at least 10,000 different species this may take you some time but it will be worth it -- depending on where you are located it could be very pretty (your location will be helpful when googling). If it survives and emerges it will most likely be a harmless little fly that will die shortly after it mates.