Konstantin Dmitrievich Levin, in a way or the other, is a self-portrait of the author Tolstoy himself. So, your question if Levin would have Oblonsky as his friend in real life seems answerable.
In Part 1, Chapter 5, it is mentioned that Levin and Oblosnky were childhood friends,
Levin comes to Oblonsky’s office, interrupting a council meeting. Levin and Oblonsky are friends from childhood, but they have led very different lives.
From the initial chapters (after Levin gets introduced) we instantly understand that Levin is an independent-minded man. Oblonsky is not a man with a great serious emotional depth, he can't settle on any one feeling for very long.
Dolly was no longer attractive and good-looking to Stiva, so to satisfy his shallow emotional urges, even forgetting that he was father of five children (two of them couldn't survive), he went for other women to satisfy his desires and as Tolstoy writes:
He could not at this date repent of the fact that he, a handsome, susceptible man of thirty-four, was not in love with his wife.
All he repented of was that he had not succeeded better in hiding it from his wife.
Levin being independent-minded and socially awkward didn't take that flaw of Stiva's character as a barrier in their childhood friendship. We, accepting Levin as his own person and follows his own vision of things, cannot say of Levin's view on Stiva's adultery in entirety. But even if Levin were to accept the majority's view and holds some group's prefabricated views then also it seems plausible and reasonable why Levin didn't break from Stiva, because Dolly herself didn't break from Oblonsky even after more than one adultery and also none of Scherbatskys shunned Oblonsky, not even an intellectual personality and Levin's own half-brother Sergei Ivanovich didn't consider Stiva's adultery in their friendship, then why would Levin do that?