If you are allergic to analgesics, you should probably not take them. However, it really depends upon the analgesics that the person is allergic to. There are so many different analgesics that someone could take, that it is probably impossible for one person to be allergic to all of them. Since they are painkillers, it is advisable for the person who is allergic to them to stay away from.
They can find alternatives to take or use instead of taking these drugs that they are allergic to. The person may find an alternative medicine that they can take that does the same thing, but it does not have the ingredients that the person is allergic to in the drug. That way they can still feel relief.