We introduce two- and one-dimensional (2D and 1D) systems of two linearly coupled Gross-Pitaevskii equations (GPEs) with the cubic self-attraction and harmonic-oscillator (HO) trapping potential in each GPE. The system models a Bose-Einstein condensate with a negative scattering length, loaded in a double-pancake trap, combined with the in-plane HO potential. In addition to that, the 1D version applies to the light transmission in a dual-core waveguide with the Kerr nonlinearity and in-core confinement represented by the HO potential. The subject of the analysis is spontaneous symmetry breaking in 2D and 1D ground-state (GS, alias fundamental) modes, as well as in 2D vortices and 1D dipole modes. (The latter ones do not exist without the HO potential.) By means of the variational approximation and numerical analysis, it is found that both the 2D and 1D systems give rise to a symmetry-breaking bifurcation (SBB) of the supercritical type. The stability of symmetric and asymmetric states, produced by the SBB, is analyzed through the computation of eigenvalues for perturbation modes and verified by direct simulations. The asymmetric GSs are always stable, while the stability region for vortices shrinks and eventually disappears with the increase of the linear-coupling constant, κ. The SBB in the 2D system does not occur if κ is too large (at κ>κmax); in that case, the two-component system behaves, essentially, as its single-component counterpart. In the 1D system, both asymmetric and symmetric dipole modes feature an additional oscillatory instability, unrelated to the symmetry breaking. This instability occurs in several regions which expand with the increase of κ.