Answer: The Mishna Berura (551:16) writes that one mustn’t listen to music during the three weeks between Shiva Asar B’tammuz and Tisha B’av (See Minchas Yitzchak 1:111:4).
The Pri Megadim (Eshel Avraham 551:10) writes that musicians who are employed by non-Jews may play during this time. He compares it to working on chol hamoed, which while normally forbidden, is permitted for one who would otherwise lose substantially as a result (davar ha’avud). The Mishna Berura (Biur Halacha 551:2) explains that this only applies until Rosh Chodesh Av. One cannot, though, play music even for work purposes during the nine days (See Shearim Metzuyanim Behalacha 122:2).
Other poskim are more lenient. R’ Eliezer Waldenberg (Tzitz Eliezer 16:19) quotes the Kaf Hachaim (OC 551:39) who allows employed musicians to continue playing up until Rosh Chodesh. He continues writing (ibid. 41) that one who does teach music during this time should teach sad songs rather than jolly tunes that bring happiness. R’ Waldenberg explains, however, that this restriction is referring to one who is employed to play even during the week of Tisha B’av.
Likewise, R’ Betzalel Stern (Betzel Hachachma 6:61) writes that one may play music if they are employed to do so even during the nine days. Similarly, R’ Ephraim Greenblatt (Rivevos Ephraim 2:155:2; 6:291:1) writes that as one doesn’t get such enjoyment out of learning or teaching music, one may continue to do so during the three weeks (See Igros Moshe OC 3:87).
In conclusion, one may continue music lessons up until Rosh Chodesh Av. One who needs to continue teaching for their livelihood or learn for an upcoming exam may continue playing even during the nine days but should try to play more sad songs where possible.