No reason why not, people do that on mountain bikes on trails. Pavement is easier. Lots of people tour with flat handlebars/upright posture, or do charity rides that way as well. I've done 80, 90 km rides on a comfort/cruiser style bike at a decent pace.
You definitely want to get your seat adjusted though. You'll use more muscle(both different muscles in combination, and sheer mass), making it a lot easier. Once you get adjusted of course.
in my completely noob, uneducated opinion, saddle and leg position matter more than bike. A high quality/well matched bike will make things easier, for sure. But without good fit and saddle, it doesn't matter what you ride, you'll hit a wall a lot sooner. But again, I'm a noob.
Be sure and have enough liquid and some food. Most bike/running/tri/outdoor shops will have fast digest gels and energy bar sort of things, meant to be consumed while active.
Or you could classic and eat bananas and pb&j's. Or convenience store snacks.