So if I beat the first gym and level 20 Pokemon obay me, will a level 21 or higher disobey me or is it just level 21 traded Pokemon?
Yes level 21 or higher Pokemon that are traded will sometimes disobey you. If you beat other gyms, the level keeps going by 10 until you beat the last gym leader and that you can use any traded Pokemon.
To add to this, in past Generations (I think 3 and back) all Pokemon would disobey you if you went over the limit. My source is personal experience.