I just read about the backstory. Gaff (Edward James Olmos) put the unicorn where Deckard would find it as a message. He was gently informing Deckard that he was a replicant. Deckard had just dreamed about the unicorn and told nobody, so the only way Gaff could know is if he knew which dreams Deckard had implanted in his memory.
This came from Ridley Scott, not Philip K. Dick.
I am impressed that Scott was so subtle about this for so long. It would have been a short-term boost to hit us over the head with it, as in The Sixth Sense. But being coy about it helped to make the movie a true classic.