I'm reading a book right now called Libriomancer by Jim Hines. Fantastic read. It's about a guy who can reach into books and pull out objects into reality. In the book he mentions several books that actually exist, talks about vampires who sparkle that have come out of Stephanie Meyers book, and even mentions Charlaine Harris. Now the grey area is whether he's gone out to all these authors and gotten permission before using them in his book.
However early on in the book he pulls out a gun which is very similar to a phaser and talks about a book which is oddly similar to Star Trek, but purposely calls it something else, which I'm guessing he does to avoid copyright issues. But Star Trek isn't just a literary phenomenon, it's movies, books, toys, etc.