Aims. Stellar activity is a potentially important limitation to the detection of low-mass extrasolar planets with indirect methods (radial velocity, photometry, astrometry). In previous papers, using the Sun as a proxy, we investigated the impact of stellar activity (spots, plages, convection) on the detectability of an Earth-mass planet in the habitable zone (HZ) of solar-type stars with radial velocity techniques. We here extend the detectability study to astrometry. Methods. We used the sunspot and plages properties recorded over one solar cycle to infer the astrometric variations that a Sun-like star seen edge-on, 10 pc away, would exhibit, if covered by such spots/bright structures. We compare the signal to the one expected from the astrometric wobble (0.3 µas) of such a star surrounded by a one Earth-mass planet in the HZ. We also briefly investigate higher levels of activity. Results. The activity-induced astrometric signal along the equatorial plane has an amplitude of typically less than 0.2 µas (rms = 0.07 µas), lower than the one expected from an Earth-mass planet at 1 AU. Hence, for this level of activity, the detectability is governed by the instrumental precision rather than the activity. We show that for instance a one Earth-mass planet at 1 AU would be detected with a monthly visit during less than five years and an instrumental precision of 0.8 µas. A level of activity five times higher would still allow this detection with a precision of 0.35 µas. We conclude that astrometry is an attractive approach to search for such planets around solar type stars with most levels of stellar activity.