Yes, but... Your yeast cake will have more yeast than needed for roggenbier, about 4 times as much. Leave a little beer on the yeast cake, swirl it up and then divide it into 4 sanitized quart mason jars. Use one of those for your roggenbier and refrigerate the rest for future batches.
I have dumped a wort onto a full yeast cake with acceptable results but what a waste of yeast.
Caveat: repeating this is OK, known as yeast ranching, but only for a few generations (I think 4 was the recommended max) as the yeast mutates and no longer has the same characteristics.