Combine 2 cups flour and yeast in a large mixing bowl. Place milk, sugar, butter, and salt in a saucepan over medium-low heat. Stir until milk reaches 120 to 130 degrees F (50 to 55 degrees C) and butter almost melts, about 5 minutes. Add warm milk to the flour mixture along with apple and eggs. Beat with an electric mixer on low speed for 30 seconds, scraping the sides of the bowl constantly. Beat on high speed for 3 minutes. Stir in as much of the remaining flour as you can using a wooden spoon. Turn dough out onto a floured surface. Knead in enough of the remaining flour to make a moderately stiff dough that is smooth and elastic, 6 to 8 minutes. Shape dough into a ball. Place dough in a lightly greased bowl; turn once to grease the surface. Cover and let rise in a warm place until doubled, about 1 hour. Meanwhile, combine cranberries, sugar, and water in a small saucepan. Cook until cranberries pop, about 15 minutes. Stir in walnuts, butter, and lemon juice. Remove from heat and let cool. Punch dough down. Turn out onto a lightly floured surface; divide in half. Cover and let rest for 10 minutes. Grease two 9x5-inch loaf pans. Roll 1/2 of the dough into a 14x9-inch rectangle. Spread 1/2 of the cranberry filling on top. Roll up both sides towards the center, starting from the short ends. Place loaf, rolled side-up, in a prepared pan. Repeat with remaining dough and filling. Cover loaves and let rise until doubled, about 45 minutes. Preheat the oven to 375 degrees F (190 degrees C). Bake in the preheated oven until tops are golden brown and sound hollow when tapped with your fingers, about 30 minutes. Transfer to wire racks to cool. Mix powdered sugar, milk, and vanilla extract to make glaze. Drizzle glaze over cooled loaves.