Using density functional theory calculations, we establish that the half-metallicity of bulk Ba2FeReO6 survives down to 1 nm thickness in BaTiO3/Ba2FeReO6/BaTiO3 heterostructures grown along the (001) and (111) directions. The confinement of the two-dimensional (2D) electron gas in this quantum well structure arises from the suppressed hybridization between Re/Fe d states and unoccupied Ti d states, and it is further strengthened by polar fields for the (111) direction. This mechanism, distinct from the polar catastrophe, leads to an order of magnitude stronger confinement of the 2D electron gas than that at the LaAlO3/SrTiO3 interface. We further show low-energy bands of (111) heterostructure display nontrivial topological character. Our work opens up the possibility of realizing ultrathin spintronic devices.