Motivated by a possible interplay between the mechanism of dynamical symmetry breaking and the seesaw mechanism for generating fermion masses, we present a scale-invariant model that extends the gauge symmetry of the Standard Model electroweak sector to SU(3)$_L\otimes$U(1)$_X\otimes$U(1)$_N$, with a built-in $B-L$ symmetry. The model is based on the symmetry structure of the known 3-3-1 models and, thus, it relates the number of the three observed fermion generations with the cancellation of gauge anomalies. Symmetry breaking is triggered via the Coleman-Weinberg mechanism taking into account a minimal set of scalar field multiplets. We establish the stability conditions for the tree-level scalar potential imposing the copositivity criteria and use the method of Gildener-Weinberg for computing the one-loop effective potential when one has multiple scalar fields. With the addition of vectorial fermions, getting their mass mainly through the vacuum expectation value of scalar singlets at $10^3$ TeV, the $B-L$ symmetry leads to textures for the fermion mass matrices, allowing seesaw mechanisms for neutrinos and quarks to take place. In particular, these mechanisms could partly explain the mass hierarchies of the quarks. Once the breakdown of the SU(3)$_L$ symmetry is supposed to occur around 10 TeV, the model also predicts new particles with TeV-scale masses, such as a neutral scalar, $H_{1}$, a charged scalar, $H^\pm$, and the gauge bosons $Z^{\prime}$, $W^{\prime\pm}$ and $Y^0$, that could be searched with the high-luminosity LHC.