Only a salt of the DMT (like DMT fumarate or DMT HCl) can dissolve in water, normal DMT like you'd smoke is freebase and does not dissolve in water. However, if you really have a DMT salt dissolved in water, then yes, you can evaporate it and you'll be left with the DMT. This is true of any chemical dissolved in any liquid.
If what you mean is that you have tiny crystals of DMT floating around in water, then in that case you could also evaporate the water and be left with the crystals.