Major old time tp ambiguity: prepositional phrases at the end of sentence can look just like ordinary modifiers (the classic is 'ona li pana e sitelen tawa mi' "he game me a picture" (pp) or "he showed my movie" (modifier)). Before the stricter use of the 'pi' rule, it was also possible that the final pp was a modifier of the do, that 'tawa mi' in the example went with 'sitelen' "a picture for me" rather than one given to me. This was fairly common. So, when I read your sentence, where 'Lon tomo sona, might modify either 'kulupu pi musi sike' or 'jan pi pona mute', I made a probability call. It is more likely that a ball team is at a school than that being a good friend is, since teams tend to be local, friendships not so much. Well, it is probability because it is sometimes wrong. Sorry for the to do. You do know that your example is potentially ambiguous in the same way and you had shown a weakened appreciation of 'pi'.
We have done a lot of dialog yet. What we have done has bee short, so the discourse, maybe severa sentences, maybe only a word, have been attach to 'x toki e nimi' or some such. 'x la' and paragraphs also works. And the quote followed by 'tawa x', I thonk. though I haven't a case.