Divide the 9 balls into 3 sets of 3 balls each.
Weighing 1: set 1 against set 2.
Weighing 2: set 1 against set 3.
Now you will know which is the odd set and whether the odd ball in it is lighter or heavier.
Weighing 3: Pick any 2 balls from the odd set and weigh them against each other.
If they weigh equally, then it's the third ball that's odd.
If they weigh unequally, then you know which one is odd.
Hope I helped!