The general rules for placing meeples, including knights, is that you may not place one in a feature where there is already at least one other meeple.
However if we consider a mayor that is occupying a city with no shields/pennants/coat of arms, the mayor has 0 strength and therefore has no claim to the city.
I propose therefore that a knight may be placed in a city that is already occupied by a mayor (belonging to either you or an opponent), provided it has 0 strength.
Linkback: https://www.carcassonnecentral.com/community/index.php?topic=4443.0