You are correct. A hit ball in the infield that is in fair territory, even if barely touching the line, is fair if touched by a defensive player. The location of the ball is what is important, not where the fielder is when the ball is touched. Same with a fly ball that is near the foul line. If the ball is in foul territory when touched, even if the fielder’s feet are in fair territory, it’s a foul ball.