The Cutter Inn, about 5 minutes walk from Ely Station. Terrace at the back for outdoor drinking and train viewing. Link to their website
here.
Usually about 4 real ales available.
In terms of preserved lines, I recommend The Corn Mill, across the river from Llangollen station. Link to their website
here. You can enjoy the sights, sounds, and smells of steam.
Again, 4 or 5 real ales is the norm.
Attached, a couple of views I've taken from those establishments myself. 66596 and 158854 from The Cutter Inn, and Llangollen Station from The Corn Mill.