It's actually done pretty commonly. Usually as a "hey, I love working here and would love to stay, but I have an offer from company XYZ for $X. Is there any way we can work toward that number?" My friend just got a $10k raise in a day doing that last week. Granted, you have to actually have an offer in case they tell you to GTFO.