It is improper to “congratulate” someone on their recent engagement. By saying, “Congratulations!”, you are inferring you thought they might never find a mate and are therefore insulting them.
When someone announces their engagement, you might want to say, “That’s great!”, “I’m so happy for you!”, “You both make such a wonderful couple!”, or “That’s wonderful news!”.
Also, please do not ask if you’re invited to the wedding. Doing so places the engaged couple in an uncomfortable situation and is therefore rude. Wait for an invitation to find out.