If you want small and cheap, you can't beat using one 1N4148 or 1N4150 instead of a bridge rectifier.?
Used with a cap of 100 microFarads (uF) or so, the same resistors can be used as with the bridge rectifier.
Of course, it will only give half wave rectification, but it's fine for unfiltered use on DCC, with less brightness unless the LED series resistance is decreased to about half, with flickering if rail contact isn't continuous.