Strictly speaking, no, the two are not equivalent. Molarity is subject to changes in temperature, since the density of water changes. Molality is designed to overcome that problem. The definitions are also different - molarity is calculated in terms of the volume of solution (i.e. volume of solute + solvent = total volume), whereas molality is defined in terms of the mass (in kg) of solvent only, so there will always be a small difference between molarity and molality. If you make several assumptions, i.e. that the temperature is standard state such that the density of water is 1 g/mL and that the volume difference between the different solutions is negligible, then the approximation works. But it is trivial to calculate the correct masses of NaCl and glucose needed to prepare the different solutions rather than try to take shortcuts.