It is indicated that a lay person may give a “talk” but not a “homily”. (I hope I understood that correctly).
At my old parish, we didn’t really have a pastor, but instead we had a parish director who would regularly give a “talk” at mass (we regularly had a visiting priest from elsewhere within the diocese).
It seems that since it was a regular practice, that it was a homily (thus in violation). But perhaps these were only talks?