Mix the yeast, flour, margarine or butter, milk, egg yolk, vanilla sugar, salt, and lemon zest (or aroma if using) to make a yeast dough.
Let rise at room temperature until roughly doubled in size.
Knead again and roll out into a rectangle approximately 5 mm thick.
Core the apples and grate coarsely. Add lemon zest or lemon flavor, then cook over medium heat for about 5 minutes.
Drain through a sieve and let cool to room temperature.
Prepare vanilla pudding: either combine the drained apple juice with milk to make roughly 250 ml total (for more apple flavor) or use milk only (for more vanilla flavor), then heat and add vanilla sugar, vanilla pulp, and custard according to package directions.
Let the pudding cool to room temperature, then stir in the cooled grated apples.
Pour the apple-vanilla cream onto the rolled dough and roll tightly into a log shape.
Seal the ends well and let rise again until puffy.
Bake at 160 °C (320 °F) for about 40 minutes until golden brown. Optionally wrap loosely in foil during the first half of baking to help maintain shape.