Animal-like embryos came before animals
upi.com
upi.com
The answer is still the egg, of course, because the animal that laid the egg was just genetically shy of being what we think of today as a chicken, and it laid an egg with a new mutation that is The Chicken.
So a non-chicken laid a chicken egg and a chicken was hatched from it.
Actually, the only reason I know what that means is a course I took at https://www.complexityexplorer.org which was presented by Santa Fe Institute. Anyone interested in the origins of life should check it out. The courses are free, btw.
The final exam for the Origins course could be pretty much summarized by what you said. Hopefully they'll re-run it.