A molecular-based equation of state derived from perturbation theory is used to study the phase diagram and thermodynamic properties of water and ammonia in the fluid phase region. The molecular model that represents these substances consists of spherical particles interacting via a square-well potential with an embedded point dipole. The equation of state is an analytical expression, which depends explicitly on density, on temperature, and on the four adjustable parameters of the potential model: the particle's diameter, the energy depth and range of the square-well interaction, and the dipolar moment strength. Although the associating behavior due to hydrogen bonding that characterizes water and ammonia is not modeled by the perturbation approach followed in this paper, the theory is able to predict (except in the critical region) the vapor-liquid phase diagram and the saturation pressures, with accuracy close to that of theories that include a modeling of the H-bonding effects. A detailed comparison of experimental data from our theory and from three different approaches based on the Wertheim perturbation theory for associating fluids is presented. This comparison indicates that none of the later theories is able to give an accurate prediction within experimental error of the phase diagram of water, for the whole region of densities and temperatures for the fluid phase. This paper presents the ranges of values for density and temperature where each theory is accurate. Since the theory presented gives comparable predictions to those of the other equations, the dipolar square-well potential used in this work could be considered a good effective potential for associating polar fluids if the dipolar moment of the substance is taken slightly higher than its real value, an indication that by increasing the dipolar moment strength it is possible to mimic, at least in relation to thermodynamic properties, the H-bonding effects. The simplicity of this model can be useful as an important ingredient in the building of better equations of state for polar associating fluids.