Perhaps ancestor worship began as a cultural overlay, but it is possible to use this as an important Buddhist tool.
The Buddhist teacher, Ven. Thich Nhat Hanh often points out that he meditates on the cloud in his tea cup whenever he drinks tea. That is, the water in the tea was a cloud at some point, thus all things inter-are. Cognising the interbeing nature of reality is important to develop compassion and respect for all beings, plants, minerals and elements.
Training the mind to see connections that aren't visible to the senses is important to realize the interbeing nature of reality.
Like a cloud makes tea, ancestors make us. Ancestor veneration in this sense develops in us compassion for beings we can't see or normally perceive and reduces our selfish existence.
In the ultimate reality there is anatta, but in conventional reality we do have ancestors. One must not abandon norms of conventional reality merely because one has understood ultimate reality. It is not nice to live in ultimate reality alone, just as it is not nice to live in conventional (materialistic) reality alone.
We must transcend the conventional and the ultimate, not be attached to either end.
Growing very strongly attached to emptiness produces a wisdom that is devoid of compassion. Compassion is most certainly a conventional truth. When the Buddha passed away, many Arahats objected to the first Buddhist council for they believed it was impossible to set down the teachings on emptiness in conventional language. Those who were in the presence of the Buddha could feel the boundless affection and compassion with which the words regarding emptiness were delivered. How can a Sutta even hope to convey that compassionate presence of the Buddha, they bemoaned?
Thus the teachings on emptiness were guarded like a secret, and monks and dharma teachers only revealed the truth of emptiness to a select few when they believed the student was ready. I believe teaching emptiness to someone who isn't ready is a valid ground for expulsion from the order.