Is it possible that a child could overcome an allergy completely, over a few years?

Sometimes. Some kids outgrow food allergies overtime. It is not uncommon.
Define overcome! Some kids with simple nasal allergies become less symptomatic when older (bigger nasal passages) and able to blow their nose well & avoid things that trigger them. Some foods can be less of a problem and some not. Things like a peanut allergy can be life threatening and life long. Simple blood tests can identify which foods are dangerous and which less so. Your doc can sort this out for you.