It is certainly possible that Bashar Assad will be able to remain in power if the Syrian Civil War is ended peacefully, however it is not very likely he would, or at least would for long, because any peace deal would probably involve him having to relinquish power altogether for peace.
Bashar Assad's policies are what led up to the civil war. The conflict itself will not likely end until a new leader is found. Even then, if the new leader is Alawite, then it becomes just more of the same regime. A moderate candidate is necessary for a peaceful resolution. A military leader is necessary for the uprising to be crushed and for the follow up oppression. There is no scenario where the civil war ends and Bashar remains in power.
If he can prove that he is still a good leader and will be able to fairly lead his people, then yes he will still be able to keep control of the control. He has to publicize himself, and get the people to want to follow him again like before.
It is not possible for Bashar Assad to remain in power if Syria reunites to end the current Civil War. The people of Syria will not accept a leader that allowed the country to go downhill and continue to not support them and try to take them out of the turmoil.
If the two sides in the Syrian civil war were to reunite it would be impossible for Asaad to stay in power.He has committed so many atrocities against his own people that the rebels could not remain peaceful under his regime in good faith.They would have to be constantly on guard and riots would probably occur.