What you want is a "mixer". This is a device that routes multiple inputs to a stereo out put. You can pan any input to either side it pan both inputs to the center.
I use one of these for the same purpose, getting a play along CD (from an iPod) into the headphones at the same time as the DP output. But I use the line-out from the DP, not the headphone jack. Better quality sound that way
The "pan" control allows you to place a source so it sounds like it is located at any place between your two ears. Best, I think to center the piano and move the background music to one side.
Mackie makes a very good quality small mixer that can route the output to headphone and monitor speakers. http://www.sweetwater.com/store/detail/402VLZ3/
There are also some cheaper clones of this mixer that cost less lack some of the quality, but are 1/2 the pricehttp://www.guitarcenter.com/Behringer-Xenyx-502-Mixer-103846200-i1153498.gc
Some compurer audio interfaces can do this too. It's common in a recording studio for a musician to listen to (say) a drum and bass track while playing his part in time so many of the audio interfaces allow this. But I'd use the mixer unless y uo are already set up for recording
If you are buying a mixer you might want an "802" so you can handle bigger jobs that might come up.