Ah, if you need to know that for certain then you'd be restricted to 18 balls (6,6,6), (2,2,2), (1,1). Otherwise I guess you would "only" know in 26/27 cases if it was heavier or lighter (off the balance in all 3 conditions).
....and now I understand, you would only initially know there is a difference in weight, not which side had the heavier or lighter ball.
Weigh 1: 9 vs 9 (18 on balance), 9 off
Weigh 2: 3 vs 3 (6 on balance ), 3 off
Weigh 3: 1 vs 1 (2 on balance ), 1 off