Supposing someone I know has an allergy to codeine (anaphylactic reaction), can they still be safe taking derivatives like hydrocodone?

No. If they truly had anaphylaxis to codeine, almost any other opiate will do the same thing, because they are all chemically closely related and are metabolized to Codeine and morphine, which is actually the active product that reduces pain. There are non-opiate medications (opioids) like meperidine, fentanyl, Methadone and others that are different and should not cause reactions.