Yes.
Overhead wire - catenary - is the 3rd rail, you know - it's just in the sky. As long as
you can connect the pantographs to the same AC input that the rollers use, the loco will, naturally, never know what hit it.
GarGraves makes tinplated ("regular") and stainless 2-rail track, which is the same "code"
(the height of the rail from the tie) as the 3-rail track. It's the same track, actually, but
missing 1/3 of its rails...
Only quite low Code rail is a problem for hi-rail flanges (some early Williams and ROW
brass had huge flanges, but, never mind); note that the MTH Scaletrax and the
Lionel Fastrack, of all things, both have pretty low "codes".
Go for it; catenary allows you to have a 3-rail layout with 2-rail track; the locos
are electric, just like the real ones, and both use "3 rails". It's as prototypical
as you can get, functionally.