OFP comes with a number of missiles and rockets that are meant to be used against armor and aircraft. There are anti-aircraft (AA) soldiers, with shoulder launched Stinger AA missiles for NATO and Strella missiles for the Russians. Then there are vehicle mounted missile systems, including TOWs, Hellfires, CH-29Ts, FFAR and 57mm rockets and AT5s and AT6s.
Any vehicle, including aircraft that are not in flight, can be locked on target with any of the abovementioned weapons, by placing the weapon reticule over the target and clicking on the right mouse button. Note that you will not see the targeting reticule if you've disabled the WEAPON CROSSHAIR setting in OFP's DIFFICULTY options.
However, the only weapons that can lock onto an in-flight aircraft are AA missiles. That only includes the already mentioned Stinger and Strella missiles. All other missiles and rockets used by officially supplied air and armor addons cannot lock onto an aircraft in-flight.
Practically speaking, that means that none of OFP's officially supplied planes or helicopters come with any AA missiles. The only weapons you can use to lock onto another aircraft while in a dogfight are the aircraft's cannons. However, there are various unofficial aircraft addons that are outfitted with AA missiles, such as Sidewinders or wing-mounted Stingers, that would allow you to lock onto other in-flight aircraft.