This is an old Zen story that is recounted in a book that I am currently reading called Zen Guitar
by Phillip Toshio Sudo. A book that is full of sage advice and not just about music (I recommend it to anyone who is interested in music and or meditation).
It relates to the experience of a monk named Ryokan, who returned home one night to find a thief.
"Living an ascetic life, Ryokan had nothing in his home worth stealing. But he surprised the intruder, saying,"You may have come a long way to visit me and you should not return empty handed. Please take my robe as a gift."
He offered forth the robe from his back, and the thief slunk away.
"Poor fellow," the master said, gazing at the night sky. "I wish I could give him this beautiful moon."