You’re not allowed to play someone else’s character since sharing accounts isn’t allowed and if Blizzard catches you, you can get punished for it.
But, taking a lower level and helping them level up quickly in game with your higher level character is called “rushing” in Diablo and it’s been around since the first Diablo game. It’s allowed. Blizzard has made it a little harder to do it in Diablo 4, but it’s still doable and it’s not considered a negative thing in the Diablo community.