As long as you develop what makes your game unique (and a roguelike) in the 7 days frame, that works.
In the past, I've taken existing games, removed all their core gameplay aspects, and then implemented the new game on top of the empty cask, just taking advantage of engine infrastructure. Eventually, that code that was reused over and over was turned into an engine.
This may seem unfair to devs starting from scratch but OTOH, taking something existing and turning it into something different enough may be a great challenge in itself (harder than starting from scratch). It all depends on what you want to reuse.
It's trickier when the game you used that codebase from is not public because it'll make it harder to judge how much of the original made it to the 7drl; in these cases, it's best to be super clear and, if possible, have that other part be accessible somehow if only for reference.