Preheat the oven to 400°F (200°C). Line a baking sheet with parchment paper.
In a medium saucepan over medium heat, combine the chopped rhubarb, granulated sugar, cornstarch, vanilla extract, and lemon juice. Cook for about 5-7 minutes, stirring occasionally, until the rhubarb is tender and the mixture is thickened. Remove from heat and let cool slightly.
On a lightly floured surface, roll out the puff pastry sheets to smooth out creases. Cut each sheet into 4 squares.
Place a heaping tablespoon of the rhubarb mixture in the center of each pastry square.
Fold the pastry over to form a triangle and press the edges to seal. Use a fork to crimp the edges for a decorative touch.
Brush the tops of the pockets with the beaten egg.
Place the filled pockets on the prepared baking sheet and bake for 15-20 minutes, or until golden brown and puffed.
Allow to cool slightly before dusting with powdered sugar, if desired. Serve warm.