Can a person reach enlightment living an average life, married with children? As the Bodhisattva had to leave his wife and son behind to become the Buddha and as the monks do a similar thing (avoiding marriage etc), I would like to know if this is some kind of precondition to enlightment, if a being needs to stay away from his family for a while and avoid new karmic bonds (marriage/children) in his way to enlightment.
The short answer is Yes. Because enlightenment depends on neither external physical attributes, actions and circumstances nor knowledge and skills and even siddhi, but inner peace that one brings into the world. One's ability to be happy in every little moment and in every new things happening around and personally in one's life is important. Being in the very centre, in the heart of life, doing everything,  whether it is work, family or spiritual service; it's needed to keep staying not involved at the same time. 

Not involved, in terms of not to be completely self-identified with these circumstances in order to keep clean mind, soft heart and good mood always. It's easier to do this when one is sitting in the cave alone, and it's harder and  challenging, and that's why is more valuable, living in the big city. We're born as humans, and humans live in society.