Red apples usually are coated in ground up beetle to give the bright redness colour. It’s considered non toxic. Donno if that’s the same as what you’re referring to. I think it’s called Shellac.
Shellac is a colourless or amber substance, derived from a secretion of the lac beetle. It's used as a coating on many food products (including apples and citrus fruits) to inhibit moisture loss and enhance shine.
Cochineal is an insect-derived red food dye, but I haven't heard of it being used to colour apples. It's often labelled as carmine or natural red 4.