The answer to your question:
If your O2 sensor is a 4-wire sensor then yes it will do the job. Note that the the error code does not mean that the heater is faulty, it means that there is a fault in the heater circuit. Its worth checking the connections and wiring before buying a new sensor.
Correction/clarification of the previous statement:
The purpose of the heater is to control the temperature of the sensor. The early non-heated sensors were positioned close to the head so they heated up quickly. Then they got too hot under load so they weren't used under load. Heated sensors are usually mounted further down the downpipe and the heater is used to bring them up to temperature, this way they are functional under a wider range of engine temperatures and loads.
The O2 sensor itself does not switch, it just measures the air fuel ratio, under closed loop the ECU cycles the fuelling rich/lean, that causes the O2 output to go up and down.