Yes, it is possible to make a tilt-compensated compass using the LSM303D. Pololu has published code to do that for similar sensors.
For best results, it is absolutely essential to calibrate the magnetometer properly. How to do that, with examples, is described in the forum post linked below, which also has code for tilt compensation.
Just about any microprocessor can be used to read out the LSM303D data.