We study closedness properties of ideals generated by real - analytic functions in some subrings C of C-infinity(Omega), where Omega is an open subset of R-n. In contrast with the case C = (CO)-O-infinity(Omega), which has been clarified by famous works of HORMANDER, LOJASIEWICZ and MALGRANGE, it turns out that such ideals are generally not closed when C is an ultradifferentiable class. If C is sufficiently regular and non-quasianalytic, and under the assumption that the real zero locus of the ideal reduces to a single point, we obtain a sharp sufficient condition of closedness, expressed in terms of the geometry of common complex zeros for the germs of the generators at this point. This condition is shown to be also necessary in dimension 2, when the ideal is principal. Some related questions about rings of ultradifferentiable germs and about ultradistributions are discussed.