You know, since your Tamagotchi just got married to another Tamagotchi, the teacher may have come to congratulate your Tamagotchi and give it an instrument as a reward for getting married.
I say this because when I marry 2 Tamagotchi Music Stars, the teacher pays a visit at some time a little later and gives my Tamagotchis another instrument. If you marry 2 Music Stars who have first ranking and/or 999 skill points in each category, then she will give you a Mega Drum set. I've never married a Music Star to a Tama-Go, but I imagine that the teacher would do a similar thing in that situation.
The reason the teacher doesn't show up when you marry a V5 to a Music Star is because the V5 character stays with your Tamagotchi, just like it would with a Matchmaker marriage, but if you marry a Tama-Go and Music Star, or a Music Star to a Music Star, the characters will live separately.
Edit: The reason you got a guitar instead of a mega-drum set is probably because you married a different version, or your Tamagotchi didn't have 999 skill points in each category and/or first ranking.