Yes, as long as you have a good reason to do so Uber and Lyft will have your back.
Here are some reasons why you may need to a rider out
Hostility
If a rider is verbally abusive, gets loud or puts theirs hands-on you. You need to pull over to a safe place and kick them out or better yet use the 911 panic button on your app. Both Uber and Lyft have them.
Eating, drinking or smoking in the car
Every driver has their own rules in their car. Some maybe okay with this and others may not. If you don’t at least give your rider three warnings before you kick them out.