Hello and welcome to JustAnswer!
Yes it can. The oxygen sensor plays a huge role in the amount of fuel that is injected when the engine is running in closed loop mode, a few minutes after starting the engine. If the oxygen sensor's signal is incorrect then it can definitely cause engine performance problems.
There are quite alot of things that will cause an engine to run rough. Have you checked for fault codes? What has been done to try to repair the problem?
The first step in diagnosing the problem is to see what fault codes are setting when the engine light comes on. Disconnecting the battery clears the important stored information necessary to diagnose the problem. It's very likely that whatever is turning the light on is related to the problem you are having.
The P030x are all misfire codes. They are most often the result of bad tune up components - plugs, wires, cap and rotor. They can also be caused by injectors, bad fuel, low fuel pressure, restricted exhaust, etc.
The P0441 is for the evaporative emissions system's purge solenoid, and is likely a bad purge solenoid or lack of vacuum to it.
The purge solenoid? It's at the left rear of the intake near the throttle body. Make sure it's vacuum lines are ok and if they are then it likely needs a purge solenoid.
If it started running bad directly after you got gas then it may very well be a gas problem. Filling it up along with a fuel additive like HEET would be a good idea.