Again, that seems over cautious, and suggests a misunderstanding of what yoga's about.
Given yoga's insistence on listening to your body and respecting its limitations, I'd argue that you need more yoga, not less.
That said, you'd obviously want to talk with your instructor about poses that don't hurt your knees. There are always
modifications to poses - if you can move at all, you can do yoga - fragile elderly people, the bedridden, people with AIDS, paraplegics... all of these can, and do do yoga, and benefit from it.
Your doctor would serve you better if he explained, more specifically, what you should or should not do (don't stand with knees locked... don't flex your knee past so many degrees... avoid standing on one leg... etc.) since yoga includes a number of poses (like Legs-Up-The-Wall Pose, or Savasana (Corpse pose)) that would be beneficial to your knee.
Obviously, a full-bore ashtanga sequence is right out, but Gentle Yoga, with modifications... I honestly don't know what your doctor's on about there. If that sort of thing is too dangerous, well, then you should be lying in bed not moving, because simply walking around the house is more stressful.
Now, these poses
should be avoided, but they are not all of the poses by any means.
You might find these two links
interesting as well.