You cannot buy Applecare on any used device, so no.
But it's unclear what you did here exactly. With IUP you were paying for Applecare too in the monthly price, so if you paid off the phone you also paid off Applecare for 2 years.
You could have transferred Applecare to the new owner if so. If you paid it off and then canceled an requested a refund from Apple for the unused portion, the new owner cannot rebuy it.