A flickering E36 oil pressure warning light can be caused by variety of things. There's a fair amount posted in E36 forums on this symptom, but, read with care: many postings leap directly to a dramatic conclusion & suggest that a costly repair is required.
Sorry but we have to start with the most basic: check the oil level. Low oil levels will cause this symptom.
An oil pressure guage is very helpful to diagnose what's really going on. The stock oil pressure sensor is supposed trigger below 9psi. The sensors are known to degrade over time.
Depending on engine condition (mileage, environmental conditions, maintenance cycle, how much time it spent with wide-open-throttle or on the red-line), and given you're running 40 weight, simply switching to 5W50 may get the oil pressure at idle consistently back up above 9 psi. A motor showing normal wear and tear doesn't automatically mean you need to rebuild depending on what you want from the car.
This same prob appeared on my '98 M3 at about 200K Km running 5W50 synth. The oil press switch had degraded & fallen out of spec. Rule that out before you commit to spending any serious $ trying to fix the prob. PN 12 61 7 568 480 is probably the part but make sure you cross-ref / confirm the PN using your correct model / manufacture date details. It's easy to change and inexpensive. Be careful not to over-torque.
If your thermostat is running a few degrees above spec (hot) and the engine has high mileage, the oil press warning light may flicker. It's more obvious on hot days.
If your aux fan has failed, and you have the A/C running while idling in traffic, the engine will run hot (you'll see it on the engine temp guage) and the oil press light will flicker. (immediately turn off the AC, turn the heater and blower-fan to max & bring down the engine temp.) Change the aux fan asap - one of the plastic rad headers will likely fail if the rad is old and you run the engine hot.
Those are the ones I know. You then start considering more serious possibilities: weak oil pump, worn con-rod bearnings, worn mains... Try find a mechanic you trust who's willing to work with you before suggesting open-heart surgery.