Thanks for your question, and sorry for the delay in replying!
The easiest way to understand this sentence is to translate it out literally. Let's look at the full example again.
The translation given in the lesson is the way that we would naturally say it in English, but a literal translation would be "(I) thought to have good luck." Translating it like this makes it a little easier to see that Spanish actually works the same way that English does in this sort of situation - and so you're right, an infinitive directly after a conjugated verb is understood to apply to the speaker.
Pensé que tendría buena suerte, on the other hand, makes things more ambiguous, because we don't know for sure who the subject of tendría is - it could be the subject of the sentence, but since a Spanish speaker would be more likely to use the conjugated verb + infinitive construction for this to avoid confusion, the subject here is more likely to be someone else.
I hope that that helps to sort everything out!
¡Hasta la próxima!