Simply; if it fits & has the same connectors [or you can find alternatives in the machine] you can use it.
Apple transitioned from PATA to SATA for Superdrives later than for HDs, though I'm not sure when that transition was completed.
My 08 Mac Pro uses PATA for the Superdrive, SATA for the HDs - so I found a spare SATA port inside & wired it across to a brand new SATA Superdrive. I used a simple PATA>SATA power cable converter & added it to the existing power.
New drive is ⅓ the thickness of the old one, but still matches to the slot - so all is fine.
However, you can't go the other way; you can't patch a PATA drive into an SATA machine.
If it comes to buying a new one… PATA Superdrives are about $100 - ouch!
SATA equivalents you can get for about $15.