Ooh, this is a very "it depends" kind of territory.
It depends on your company's corporate culture:
-as mentioned above, if the culture is against raising salaries, would this put your manager in a bad position?
-how is your company with boomeranging back?
It depends on where this offer came from and what's standard in your industry:
-Did you seek out this offer while still working for your company? If so, this could get you fired or at very least, mistrusted.
-Is this offer unsolicited and are unsolicited offers the norm in your industry? If both yes, then your company probably deals with this all the time and is better equipped to handle it effectively.
Overall, I wouldn't try this unless I was very willing to leave the company anyway AND I was okay with the other offer falling through as well, AND there was some rational reason to stay if they did come through with a great counter offer. This would make sense in a situation where a job offer required a major relocation, and where finding new positions in general is quite easy.
I would NOT do this in a company with a notoriously punitive culture, I would also not do this if there are only a few options for employers, or a very tight knit industry, as it risks burning two bridges.
Personally, I always made my employer aware of the unsolicited offers I was receiving. Although I was never trying to negotiate an increase in compensation, I was definitely always using it for various forms of leverage.