There is third possibility to get a flickerfree light, which gets along completely without additional parts. It works only with newer Märklin locos, which bulbs has no contact to the chassis, what is the digital ground.
A 6090 decoder has some diodes, which works like a rectifier and convert the digital voltage to DC. The negative proportion will be used for the locomotive lighting. If the brown cable, or the framework of the locomotive are used for the return pipe of the bulb, the light will flicker. Newer decoder like the 60901/60902 has additionally an orange cable, which leads the positive DC voltage. If this cable is the return pipe, the lighting does not flicker. It is possible to solder an orange wire to the 6090 decoder, like shown in the graphic. The wire must be soldered directly to the diode (red arrow). If the orange wire would have any contact to ground or digital power, the decoder would be destroyed.