We are trying to distinguish between
9x2=18 possibilities, and a single weighing gives one of three results, so we certainly need at least three weighings.
as n_palum does, by dividing our coins into three sets of three, and weighing one against another. Six possibilities remain in either case.
If our two sets balance exactly, then we have three coins A,B,C left, and one of them is the odd one out. Weigh A against B. Now we know either A heavy / B light, or C heavy/C light. In either case, weighing A against C will finish the job.
On the other hand:
If our two sets don't balance, we have six coins A-F and we know that either one of A,B,C is heavy or one of D,E,F is light. Weigh A+D against B+E. If A+D is heavier then either A is heavy or E is light; weigh A against, say, C and we're done. Similarly if B+E is heavier (this time we'll need to weigh, say, B against C). And if A+D balances B+E then either C is heavy or F is light; again, weighing A against C will finish the job.