The minimum number of weighings required is
3
Proof it's possible:
Put 2 balls on each side of the scale.
If the scale balances, then the fake ball is in the two remaining balls. Now compare one of them with a real ball. If the scale is uneven, you will know the ball is fake and if it's heavier or lighter. If it balances, the last ball is fake and you can use your last weighing to know if it's heavier or lighter.
If the scale is uneven, one group of balls is lighter than the other. Compare the two balls in the lighter group. If the scale is uneven, you'll know one of the two balls is lighter, and you can use your last weighing to identify which one of the two it is. If the scale is even, then you'll know one of the two other balls are heavier, and you can use your last weighing to identify which one of the two it is.
Please note that here, we've also figured out if the odd ball is heavier or lighter (which was not required by the question).
Proof it's optimal:
2 weighings are not enough. The first weighing must be either one ball on each side or two balls on each side to obtain information.
In the first case, if the scale balances, you will have to guess in one weighing which one between the 4 remaining balls is fake. This is impossible.
In the second case, if the scale does not balance, you will have to guess in one weighing which one between the 4 balls you weighed is fake. This is impossible.
Actually, with the same number of weighings, you can go up to
13 balls. See this page. (it also shows that with 12 balls, you can still guess if the odd ball is lighter or heavier).