Short answer is no there is no limit on how far back the blockchain could be rolled back. As with Etherium when it was discovered that huge amounts of funds had been stolen on their network, they performed a hard fork rollback.
The basic principal in this situation is that everyone on the network agrees to fork at a block and rewrite the blockchain from that with an agreed history with the malicious transactions removed.
Other situations in the past where the bitcoin blockchain has forked have been resolved by miners coming together and mining the chain with the most hashpower.
Other cases where 51% attacks have taken place on cryptocurrencies the attack is not something that can be sustained indefinitely as has a cost associated with it. Once the attack has stopped the code can be altered to read new blocks from a time prior to the attack and the blockchain restarted from that point. Obviously any transactions made during the attack are lost. However this option to hard fork back at a historic block makes the 51% attack on an orphaned chain.
I believe in order to perform a 51% attack you need to mine a block, maybe a few to let you start the attack and then you can control the next blocks and have started your attack, you can mine blocks privately and not broardcast them leaving everyone stuck on a block thus they would not mine on an orphaned chain a number of blocks.
I believe what you are talking about is a timewarp attack and this has been nicely answered here