I know a manger at my company that provided a reference and was reprimanded for it. They even told him I'd he ever does it again, he's fired. I heard of at least one other manager who was actually fired.
If there were a formal company policy, I'd probably either demure or, if I felt strongly about it, make sure it was over beers at the bar or in some other venue that there was no record.