IIRC, if you are getting an error code, it's really telling you that the heater element in the sensor is bad or going bad. I don't think that it can actually sense that the sensor is malfunctioning.

Running with a bad O2 sensor won't harm your engine but I've been told that it can cause your Catalytic Converter to clog over time.