Although Demerol and Morphine are both pain killers- they are in a totally different class of medications. Even though one of your family members is allergic to Morphine- does not mean that you are going to be. It is true that allergies can tend to run in a family-- but that doesn't mean that it will happen.
I am severely allergic to penicilling to the point of having an anaphylactic reaction to it. My son, however, has taken it several times and has never had a problem.
I know it is scary- but truly if you do find out that you are allergic to Morphine- it is best to find out in a medical setting where the medical personnel can quickly reverse the medication- as opposed to one day-- the possibility of you being prescribed a morphine related pain medication and taking it at home and then having a severe reaction.
Speedy Recovery on your surgery!