Yes.
Yoda trains ALL Jedi from child until they 'graduate' to Padawan. Then they are assigned a senior Jedi to take them out into the Galaxy to learn until they are ready to be a Knight.
So Yoda was once Obi-Wan's Master and instructor, and then Qui-Gon took over.
Trick is, Anakin NEVER had Yoda's basic training, so presumably Obi-Wan tried to give it to him, hence his comment in ROTJ about being wrong about being able to do as good a job.
Ben's master/trainer etc....
Well, I believe the officail line OB1 said in ESB was this : "Luke, you must go to the Dagobah system, there you will find yoda, the jedi master who taught me"
also in ROTJ "your father was a good man, when I first knew him, he was already a great pilot, but I was amazed at how strong the force was with him, I took it upon myself to train him, I thought I could instruct him as well as Yoda, I was wrong"
Therefore, there is no discrepency as far as I can tell. Although I am not sure why Yoda would have allowed this, but who knows.