I don't think it's a trick of the mix. I think he had a "happy birthday" synth track as a separate element and he just mixed it into everything else. Especially since the sound "sticks out" on the end of the phrase in reverb after everything else stops. Given he's a grand master at mixing and rhythm management, he may have just done it live on a keyboard over a pre-baked rhythm track.

Audacity can overdub and you can overlay live elements as you wish in addition to editing.

Audacity will not record a MIDI performance, so if you do have a MIDI keyboard and can perform a track like that (I think my big keyboard will do that with one of the synth stops), you'll need to turn it into an actual sound track for Audacity to manage or record it. The USB MIDI connection isn't going to do it; I use my headphone connection.