How much to eat and drink during a 50km ride? I want to try a 50 km ride for the first time, to be completed continuously one morning.

The most I've even done before is an 18 km (70 minute) each way commute (out in the morning and back in the evening).

When I commute I eat (breakfast, and late afternoon snack) before I ride, but I eat and drink nothing during the ride.

I guess that the difference between that and a 50 km ride is that, on the multi-hour ride, I ought to eat or drink something on/during the ride to replenish? How much should I eat and drink then, and when? Should I expect to take rest stops, and/or to go more slowly on average?

I'm wary because I think I've read that glycogen depletes at around the 2-hour mark, whereas my longest continuous ride to date has has been only 80 minutes.
50km isn't that enormous of a distance - and especially for someone who does 18km twice a day.  It sounds like your current pace would have you completing that in about three hours.  I'd bring a snack or two if you're worried about being peckish, but unless you're going all-out for a personal record or you skip breakfast you should have no issues.  Just keep turning the pedals, make sure you drink some water, and feel free to take a 5-minute stretch and snack break if you're feeling tired.