I'm not familiar with the car model in question, but many cars are more sensitive than one might expect to even slight tilt in the surface where they're parked when reading the oil level. You might give some thought to whether your erratic readings were all taken in the same, or very similar, "vertical orientations" of the vehicle.
Different ones also vary in how quickly the oil runs down after the engine is shut down, and a rather large fraction of the oil in the engine can be retained higher up in the engine, especially if the engine wasn't "fully hot" when parked.
Some dipstick tubes also retain oil, so it's necessary to always pull the dipstick, wipe it fully clean, and then reinsert fully and pull out immediately before reading the level. Oil retained in the guide tube can make it appear to wet the dipstick well above the actual level of oil in the pan, so you need to look for a "well defined line" where the oil on the dipstick ends to assure an accurate reading. "Wiping the dipstick" means wiping until it "looks dry" in the area where you'll look for the oil level indication, and it should still look dry when you pull it out to read it at all of the area immediately above the oil line.
With a few engines, cleaning the dipstick and then running it down to swab the oil out of the tube, then cleaning again, before running the stick down for the measurement may be necessary. This is especially likely to be needed if there's significant "gunk" in the engine, since the sludge (sticky oil) can accumulate anywhere that the oil doesn't flow through, as in the dispstick tube.
An intermittent engine light is, as mentioned before, frequently caused by "electrical noise" in the system. Most commonly the noise comes from a poorly seated ignition (spark plug) wire, although a loose connection almost anywhere can be the culprit. Deteriorated high voltage wires can also be the cause due to "corona emissions," but even on a "used engine" I'd expect a competent shop usually to put new ignition harness on.
Some emission test methods do require that a "plug wire" or "coil wire" be disconnected so that a connection can be made to the test machine, and the technician may not have re-seated the wire securely. "Modern" machines usually use an inductive pickup that just clips around a wire, but it's still possible to dislodge the one it's clipped to. "Modern engines" usually have a terminal on the "distributor" that test equipment can hook to, but a careless technician can disturb other wires getting to the connection.
The "coil wire" between the spark generator and the distributor or the "number 1 cyclinder" plug wire would be the main suspects.
If the source of an electrical noise isn't in the ignition system "hot side" it most often is at one of the main ground points, where the circuits are connected to the engine block or body frame.
Random bad connections can be almost impossible to find "electrically," so the usual procedure is to "inspect visually," and "wiggle aggressively" until something is found dirty or comes loose. The visual check often means disconnecting, wiping or scraping, and reconnecting securely, and of course you need to be prepared to repair anything that "comes loose" when you wiggle it.