Can I say "Congratulations on your promotion" to the higher rank person? - congratulations wording on the arrival of new baby

Can I say: "Congratulations on your promotion" to someone more senior?
Is it only the person above to?

If so, how can I say, without promoting the word "Congratulations" to my boss.

As you can tell your friend and the promotion of the boss?
Please help me.