Could you work a job such as a teacher or a scientist while addicted to opiates? Sure, you could, and there are people who do.
Morally, should you work a job like those while addicted to opiates? That's where it gets complicated.
Again, it depends on how bad the addiction is - are you just taking Vicodin tabs nightly, or are you mainlining H multiple times a day? Completing your higher-education program in due course, while addicted to opiates, should at least give you an idea about how difficult it would be to continue such in the real world.
Her line about teachers with addiction is a flat-out lie. I once knew a woman who taught 2nd grade/year two, and was a huge cokehead - she even admitted to using it in the school. (I learned this the day I met her - at last call, I told her she didn't look so good, and inquired about if she had to work in the morning. She then told me her job. My jaw dropped. She said "No, it's fine. I'll just do a little blow before homeroom. The kids love me when I'm on it." ) Did it affect how successful she was as a teacher? I don't know - I never saw her in action. I know her personal life, and how she conducted it, was a mess, though. I will be discreet, but I've also met several high-functioning people who use opiates (or other hard drugs) and continue to hold onto white collar jobs.
Opiates, as compared to other habitual drugs, would obviously be the hardest challenge to use habitually in a fast-paced white-collar enviornment (er, I say it is a tie with alcohol). Most other addictive drugs, such as coke or speed, can be taken in a performance-enhancing way, and then you're just a wreck outside of the workday. You don't hear much about opiates being performance-enchancing - instead, they seem to be a means to slow life down/escape the daily grind. Think about it - if heroin were legal, the "do not drive or opperate heavy machinery" warning on the label would be very in-your-face. And for good reason (just as it is on alcohol bottles).
Also, remember that opiate addiction is one that is a tough one concerning growing tolerance and overall worsening of conditions the longer one uses. So there is a difference beteween becoming a teacher as an opiate addict and having a succesful career as a teacher while all along using opiates.
Not to derail your thread into a "is it morally okay to use opiates in certain fields of work" discussion, but honestly I would not want an opiate addict teaching my children. Functioning or not, I just don't think drugs should be used around children, or recently used before being around children. Same goes for scientist positions where you have the potential to slip up and hurt yourself and/or others very badly. I know that not all scientist jobs are physically dangerous, but my same moral policy would apply to those jobs where your actions directly affect others' safety.
Also, note that a lot of teaching jobs (aside from professional level) drug test, as do many companies which emply scientists, so be alert to this.