Water ice is much harder to find than rocks. It's more useful for drinking, and the binding energy of hydrogen is greater than the metal in rocks. (I.e. it takes more energy to get oxygen from water ice than from rocks.)
And how exactly do you plan to use the hydrogen for fuel? What's your oxidizer? Other than the very same oxygen you just worked so hard to make in the first place.
Also, although the most common metal from rocks is silicon, iron is not uncommon on mars, so if you pick your rocks properly you get iron as a waste product, which you can use for building.