This can be done in
6 steps. This is the theoretical minimum, since there are ~5.4 trits of randomness here.
Steps
Separate the coins into A1-A9, B1-B9, and C1,C2.
Step 1 Weigh the As against the Bs.
Step 1.1 If equal, one of the three groups must contain both the heavy and the light ball. Swap A4-A6 with B4-B6 and remove A7-A9 and B7-B9 from the scale. Weigh A1-A3 and B4-B6 against B1-B3 and A4-A6.
Step 1.1.1 If still equal, the heavy and light are in a group of at most 3 together. Next weigh A1,B2,A4,B5,A7,B8 against B1,A2,B4,A5,B7,A8. This is a pairwise comparison: Since only one coin from each group is removed, if the heavy and light coins are not in C1 and C2 then there must be at least one heavy or light coin on the scales. Since the pairs from the groups of 3 are on opposite sides, the heavy and light coin cannot balance each other.
Step 1.1.1.1 If these are equal, then C1 and C2 are the heavy and light coin. Weigh them once to determine which is heavy and which light, for a total of 4 steps
Step 1.1.1.2 One of the groups is heavier than the other. WLOG, assume it is A1,B2,A4,B5,A7,B8. This means the heavier coin is A1,B2,B3,A4,B5,B6,A7,B8, or B9. Which of the 9 can be determined in 2 weighings (weigh 3 against 3 and then 1 against 1). If it is one of the Bs, the lighter coin is immediately obvious as the one in the same group of 3. If it is an A, the two As in the same group have to be weighed against each other. This is a worst case of 3 + 2 + 1 = 6 weighings.
Step 1.1.2 Similar to 1.1.1.2, this restricts the heavier coin and the lighter coin to mutually exclusive groups of 9. The heavy 9 and light 9 can be narrowed down in 2 steps each, for a total of 2 + 2 + 2 = 6 weighings
Step 1.2 WLOG, assume the As are heavier. Weigh C1 and C2 against A1 and A2.
Step 1.2.1 If equal, C1 and C2 are eliminated and the 9 (technically 7 but it doesn't matter) As contain the heavy coin and the 9 Bs contain the light. 2 weighings each for a total of 2 + 2 + 2 = 6 weighings
Step 1.2.2 If C1 and C2 are heavier, C1 and C2 contain the heavy and the Bs contain the light. 2 + 1 + 2 = 5 weighings
Step 1.2.3 If C1 and C2 are lighter, weigh C1 and C2 against B1 and B2.
Step 1.2.3.1 If equal, C1 and C2 are eliminated and the heavy must be A1 or A2 with the light in the Bs. 3 + 1 + 2 = 6 weighings
Step 1.2.3.2 If C1 and C2 are lighter, the light must be C1 or C2 and the heavy is in the As. 3 + 1 + 2 = 6 weighings
Step 1.2.3.3 If C1 and C2 are heavier, the heavy is A1 or A2 and the light is B1 or B2. 3 + 1 + 1 = 5 weighings
In each case, 6 or fewer comparisons are made.