I've acquired a table lamp with a 20W 12V bulb (possibly from IKEA?). The cord terminates with a female 2-pin DIN (41529) connector that I do not have an adapter for. Am I correct to assume that it needs an AC adapter to connect to my 120V wall socket, or could I simply splice a standard wall plug in place if the DIN connector?
NO AC PLUG, it almost certainly takes a 12V adapter. Is the plug polarized? (or is it symmetrical?). You probably also need to determine if it is AC or DC (although an AC bulb probably would be fine on DC, but NOT the other way around!).
Do this by examining the bulb for printed ratings, or a model number for the fixture. See if you can find any information online. Also beware if the socket could take a larger wattage bulb, to insure you don't change a bulb out in the future that overloads the adapter. (See if there is a sticker in the hood stating 'maximum bulb size xxx', and get an adapter big enough for that wattage [volts x amps = watts]).
You will also need enough power (adapter rating) so the adapter won't burn out or catch fire, as Jasen advised above! 12V @ 20W bulb will draw about 1.66Amps, so like Jasen said, a 12V adapter rated around 1800mA to 2 Amps [2000mA]. This will be a larger sized adapter, say 4" long, not the small ones.