You will need to read the code(s) before you can determine if it is safe to drive the car. Miatas for example, can run about 5 miles before destroying the cat if the coil pack is bad. -- 1998 Volvo S70
Did they tell you what the specific code was? You might get more response here if you knew the exact code.
More often than not, the sensors eventually fail. 02 sensors are not very expensive and you can replace them yourself if you are inclined to DIY repairs.
Here's another thought that could relate your problem to the oil change. Make sure the oil wasn't overfilled as this could cause problems as the surplus finds it way through the exhaust. I know this isn't likely but this did occur with an S70 of someone we purchased the car from and now we are battling a CAT problem from the oil that was burned by the engine.
Thank you to everyone who responded to my question.
I brought the car in and they replaced the compressor and when they did that the check engine light went off. Hopefully that was it. So it seems that the problem is solved.