If the person was a heroin addict, codeine might not have much of a therapeutic affect to justify the risk. Their tolerance might prohibit pain relief at the recommended dose as it takes a long time to get the dopamine levels back to normal functioning. Cough syrup without codeine should work as well, except for lack of pain relief. On the plus side, the alcohol in it will help ease the pain and doesn't directly relate to their addiction. Possibly a few shots of whiskey or brandy would be a decent substitute for the codeine.