Is there a conceivable alternate timeline in which Kerensky managed to stave off Lenin and became the de facto ruler of Russia?
Yes, you just need someone with more than mediocre amount of political nuance.
You needed someone ruthless and politically astute like Frederich Ebert in Germany who is willing to keep the loyalty of the military, make peace, and ruthlessly execute left-wing (and probably right-wing) revolutionaries to keep the provisional government in power.
Additionally, its worth noting that Kerensky had to use the radical left, in the form of the Bolsheviks, to crush the radical right, in the form of a military coup. Ebert essentially did the reverse. Its telling what would happen to both states from the precedents these actions set.
That is really insightful, though I'm not sure if I can say that the left "crushed" the right in Russia (they arguably stopped a coup though), but the general idea is certainly there.
The right though, are a lot easier to co-op (at least temporarily)
If Kerensky refrains from any offensive, and crushes the Bolsheviks at some point (perhaps by backing Kornilov instead of sacking him), he'll be OK. At least 50/50 if not better. That will increase if his government also 1) completes the constitutional reforms and holds new elections (as it will discredit the idea that the soviets are really in charge) and 2) supports some immediate land reform. Than chances are probably better than 80/20.
Except unfortunately, Ebert in a way created more long term problems, because of utilizing Freikorps... well, that set a bad precedent.
Whatever mistakes the German Republic made, smashing the Spartacists was not among them. If he didn't, there wouldn't be any long term problems because the patient would have been dead.
If you're going to blame anyone else on the triumph of the Nazis in 1933, blame the KPD which de facto allied with the Nazis to destroy the SPD and other democratic parties as per Stalin's orders. KPD simply guessed wrong who would benefit from that stance.
Ebert should have made it known that the army stated it could not continue fighting or defend Germany from the allies. Put the blame on them so that there isn't the nonsense of the "November criminals". Second, avoid the 1923 hyperinflation. That would have generated more support for the democratic center.
My understanding is that after 1916 the eastern front was mostly static. What if Russia remains on the strategic defensive, detaches a few divisions to crush any uprisings while it enacts reforms/elections/etc. Could they have managed to hold things together for another year or so until the general peace?