Hello dmcb, I am interested to know what are your thoughts about possible sensors? Given the parameters, would you go for touch, distance, reflectance or width recognition or do you have other thoughts so far?
I read that you can not disturb the golf balls but you know that the balls will be in a neat line and they have differing heights and are spherical in nature so, have you looked up specifications of close range distance or reflectance measuring such as with IR vs ultrasonic? Is colour a useful option or are orange and yellow (the tennis balls are yellow?) too close? If this is a uni project then presumably you have access to sensors for testing. Have you tested measuring a golf ball and a tennis ball from a height a short distance above a tennis ball? Do spec sheets suggest one option might work better? Web sites such as pololu group sensors on the site and offer ready comparisons.
Your description is unclear on whether you are supposed to follow the line automatically or whether the tractor is guided by a person. This will affect whether you need line following (about which much can be found here) and the extent to which you might need arm positioning. What more do you know about those please?
Please forgive my slightly didactic tone. Learning by researching and doing, doubtless why you are asking and searching here, is something I favour, hence I (at least) am denying you a pat answer despite liberally strewing clues and options about the place.
I will be interested to know on what you finally settle and I am sure you will find help here if you run into implementation problems further down the track, if not different clues from other people now.