Yes I think if your O2 sensor is sending the wrong reading to the ECM, you might not have the right ratio of gas:air and it can misfire and run badly.
On the other hand, if you had a pre-existing misfire and a bunch of unburned gas was going down the exhaust, it can destroy O2 sensors and...