FWIW, I built up a test board using a 1N4148 diode and a 620R resistor with two green 2mm post leds. It works just fine at 18VAC track power, and I don't notice any flicker whatsoever. So I think the half wave diode rectification is really all you need. And it would be cheaper and easier to build than the smd variant I posted above. But for those who are worried the smd board should alleviate all issues.
As a matter of interest various manufacturers including K-Line used to connect engine marker leds directly to 18VAC track power, using a 1K resistor in series with two opposed 1.8mm leds (cathode to cathode). Worked just fine. Each led would be operating at 30 Hz, one on the positive voltage swing and the other on the negative swing, each at about 13ma.