The elodea is getting the carbon dioxide from its environment like when underwater animals breathe out carbon dioxide the plants will use that carbon dioxide. The plants can also get the carbon dioxide from the atmosphere which can "dissolve" in water.