The second interpretation is not very likely in this particular example because
先生から授業がない makes little sense. That idea would probably be expressed as
先生から授業がある works better.
This could be translated in two ways.
- I heard from the teacher that there will be a class today.
- I heard that the teacher will give (us) a class today.
However, without enough context, the second interpretation is still less likely than the first. That’s because of
今日は. It is clearly part of the quotation. If
先生から is also part of the quotation, it would most likely be placed after
But this makes the first interpretation much less likely (unless, of course,
今日は is a worthy topic of the whole sentence).
If you take out
今日は altogether, the sentence becomes more context-dependent.
This could go either way.
If you need to make it clear that you heard the news from the teacher, you can say:
This completely disambiguates the meaning.
So, it depends on word order and context.
Although it’s definitely much better than
先生から授業がある sounds a bit awkward. I guess 授業 is not the kind of noun that makes you think of its direction, which から indicates, especially when it’s not given. 〜から〜がない works better with some other nouns. For example,
先生から説明がない sounds as natural as