Chances are the roots are deep enough to do damage to sewer lines before doing damage to the foundation--but I concur with one agent, it does depend on how close the tree is to the home. There are plenty of properties with mature trees that coexist, peacefully. Often owners will go so far as to cut them down before there are any issues, which affects the beauty of the property and the street.
Foundation problems will be easy to ascertain all by themselves, regardless of the tree. When you walk inside the home, things like cracked walls around doors, sloping floors, and cracks around the exterior perimeter of the home between the foundation and the flooring are good indicators of issues. If the home is over 60 years old, the likelihood of wear and tear foundation issues goes up, anyway. If there are any of these sorts of red flags, when the work is done by a licensed contractor, they can excavate any roots (if there are any) as they are fixing and bolting the foundation.