War is war. The Syrian governmental army was warned that in such cases US and others would open fire (and they did). So, it was OK with RoE no matter how clean was the wing of Su-22.
The only issue or problem that I see with all that is consistency of the position. Why call it self-defence when the subject of defence was a recently built so-called SDF consisting of Kurds (some 20K) and arabs (some 5K)? For their ground forces Su-22 was a threat indeed, but not for F/A-18 at all.
Say it clearly that you directly support rebels with your weapons and your staff (here, pilots) on the territory where you were not invited to.