The first place to go for an answer to this question would be the physical therapist and/or healthcare provider that treated you for your knee ailments because he or she has detailed knowledge of your medical history and specific problems. However, since you mention that you successfully completed physical therapy sessions, I’m assuming that you have been released for participation in regular exercise and have no limitations for physical activity.
The first thing to consider is your bike set up. Start by noticing the angle of your seat (it should always be level). Too much downward tilt can force you to slide forward, placing unnecessary strain on your knees. Additionally, your knee should always be slightly bent at the bottom of the pedal stroke—you shouldn’t have to stretch, extend, or lock out your knee to reach the pedal. Lower your seat if necessary.
Since you mention that you teach cycling classes, you probably are already aware of the basic set-up guidelines above, so here is one more thing to consider: Where does your knee track during pedal stroke? If you allow the knee to cave in toward the frame of the bike with each revolution, you are asking for trouble. This type of pedaling promotes knee valgus and could be a big problem for the medial aspect of the knee. Repetitive knee valgus movements could set you up for medial meniscus deterioration, anterior cruciate ligament (ACL) problems, and poor patellar tracking. So, the next time you hop on the bike, observe where your knee tracks throughout the duration of each pedal stroke. If you see that it veers inward, make an effort to straighten it out so that it glides parallel with the frame of the bike. One tip that might help with this position is to make sure that your foot pressure is distributed evenly throughout the ball of the foot, and not just underneath the big toe.
If you have your healthcare provider’s clearance for continued cycling, then there really shouldn’t be anything stopping you from teaching, other than poor technique. Group cycling classes performed with proper technique can be great for strengthening the knees, not to mention the obvious cardiorespiratory benefits.