Low-energy electron-impact hydrogen loss due to dissociative electron attachment (DEA) to the uracil and thymine molecules in a water cluster environment is investigated theoretically. Only the A(')-resonance contribution, describing the near-threshold behavior of DEA, is incorporated. Calculations are based on the nonlocal complex potential theory and the multiple scattering theory, and are performed for a model target with basic properties of uracil and thymine, surrounded by five water molecules. The DEA cross section is strongly enhanced when the attaching molecule is embedded in a water cluster. This growth is due to two effects: the increase of the resonance lifetime and the negative shift in the resonance position due to interaction of the intermediate negative ion with the surrounding water molecules. A similar effect was earlier found in DEA to chlorofluorocarbons.