It is a fantastic idea and applies during mixing as well as mastering. I find that when I do professional work for clients they always have their fave CD's that they are trying to emulate so it is easy to get a hold of them.
I use a digital mixer and have a spare CD player input all together which is very cool.
Important though. You must make sure that the ref track is always playing back at the same level as every stage of your production. If you are comparing your mix to a ref track then you may need to lower the ref track by 7 or 8 dB to get a level match. My CD player has a variable output control so this is easy. My VU meters also show when things are perfectly matched level wise.
During mastering the same applies here too. You need to be able to easily alter the ref level so it matches each stage of your mastering. By the time you get to your final mastering stages then you will find the ref track will match your mastered level.
Picking the ref tracks is a bit tricky too. You need tracks preferably with very similar feel and instrumentation etc. Leave out the ones that are nothing like your mix or mastering track. They don't help so much.
Ref tracks almost eliminate the monitors and room acoustics by default. That is why they are so good. You don't have to rely on them being so perfect etc.. They really help take a lot of the guesswork out of mixing and mastering.