I had an allergic reaction to my hair dye so they said next time theyd do a weave with foils. Is that ok?

Hair dye allergy. You should see an md to see whether you had an irritant or allergic reaction and if allergic you should have patch testing to determine which chemical is causing the reaction. The most common hair dye allergy is to a chemical called PPD and there are hair dyes without ppd. Consulting an allergy or dermatology specialist is your best bet.
Not a good idea. As already answered, you need to find out if this is a true allergy. If so, you need to avoid all dyes that contain the chemical to which you are found to be allergic. Using the foils won't be able to keep all the dye off your scalp, so you will continue to get the reactions.
Patch Testing. Allergic reactions to hair dye and chemicals are typically contact dermatitis type reactions. These reaction can be either allergic or irritant in nature. Patch testing can help identify the potentially offending agent.