This question is presented in the context of Weinberg's QFT book treatment, in particular considering the electromagnetism chapter.
It begins in Chapter 3 where Weinberg argues that in order to have one Lorentz invariance $\mathcal{S}$-matrix it sufices to construct the interaction $V$ in terms of a Hamiltonian density $\mathcal{H}(x)$ which behaves under Lorentz transformations on the Hilbert space $U_0(\Lambda)$ as Lorentz scalar and commutes with itself at spacelike separations.
In Chapter 5 he shows that this in turn can be achieved writing $\mathcal{H}(x)$ locally out of operator valued fields $\Phi(x)$ with the property that under conjugation by $U_0(\Lambda)$ they transform according to some representation of the Lorentz group.
These fields in turn should be written in terms of creation/annihilation operators. This is the so-called embeding of particles into fields.
Now, Weinberg also argues that if we try to embed a massless particle with helicity $\pm 1$ into quantum fields we can do it with a skew-symmetric $F_{\mu\nu}$ which can be written in terms of a potential $A_\mu$. This potential, however, suffers from the problem that it doesn't transform as it should.
From Weinberg's arguments, we would need
$$U_0(\Lambda) A_\mu(x)U_0^{-1}(\Lambda)=\Lambda_\mu^\nu A_\nu(\Lambda x).$$
Instead the field transforms as
$$U_0(\Lambda) A_\mu(x)U_0^{-1}(\Lambda)=\Lambda_\mu^\nu A_\nu(\Lambda x)+\partial_\mu \Omega(\Lambda, x).$$
Now moving to the chapter in electromagnetism, the above behavior leads Weinberg to say that in that case we should require that the action be gauge invariant when matter fields satisfy the equations of motion so that the $\partial_\mu \Omega(\Lambda, x)$ has no effect. In that case, for all that matters $A_\mu$ transforms as a covector.
It seems that the gauge invariance requirement was made to ensure Lorentz invariance of the theory.
Question: is my interpretation correct - Weinberg is arguing that the only way to construct a Lorentz invariant theory with massless helicity $\pm 1$ particles is with gauge invariant actions?
Is this connection between gauge invariance in QFT and Lorentz invariance always true? Even for more general (non-abelian) gauge theories, gauge invariance appears in order to ensure Lorentz invariance in some context?
If I got it wrong, how should we understand this connection between Lorentz and gauge invariance?