How can a ligand be an integral membrane protein?
A perfectly reasonable definition of a ligand from Wikipedia:

In biochemistry and pharmacology, a ligand is a substance that forms a complex with a biomolecule to serve a biological purpose.

A ligand can be anything, so long as it binds to a biomolecule. Often, the ligand is a small molecule or peptide, and the thing that it binds to is a protein. On the other hand, both ligand and binding partner can certainly be proteins (or one could be a Mg$^{2+}$ ion and the other an RNA molecule, etc.). Ligand is a very broad term, and is often used in other biochemical areas aside from signaling. For example, the things that an enzyme binds to (substrates, allosteric regulators, etc) can be called its ligands.
Also, the things you describe in your post:

This seems contradictory to my understanding of ligands, which (I thought) are released from the cell in order to signal with cells (be it the same, neighbor, or distant cells).

are hormones, which is a much more specific category of thing than is ligand.
Edit
There seem to be some 'ahem'... doubters as to the broadness of the definition of ligand, so, time for some examples from the literature:
From the biochemistry textbook Berg, 7e (emphasis added):

The final step is affinity chromatography with the use of a ligand specific for the target enzyme.

From the paper Electrostatic steering and ionic tethering in enzyme–ligand binding: Insights from simulations, Wade et al (emphasis added):

To bind at an enzyme’s active site, a ligand must diffuse or be transported to the enzyme’s surface, and, if the binding site is buried, the ligand must diffuse through the protein to reach it.

From the paper Geometries of functional group interactions in enzyme-ligand
complexes: Guides for receptor modelling, Tintelnot et al (emphasis added):

There are many more examples of arginine-carboxyl interactions that appear to have key functional
roles in enzymes, including some in which an arginine-like structure in the ligand interacts
with a carboxyl group from the binding site (i.e., the reverse of that described above).

It is true that the one particular compound that natively binds to an enzyme's active site is often called a substrate, in part to differentiate it from allosteric regulators and other ligands that can also bind to the enzyme. Thus, the set of all of an enzyme's substrates can be thought of as a subset of the enzyme's ligands. Again, ligand is an extremely broad concept that simply refers to something which binds.
Edit 2
Fun fact! The modern word ligand comes from the latin verb ligāre, meaning &quot;to bind&quot;. More specifically, ligand derives from the gerundive form of ligāre, ligandus, which translates to something like &quot;(that which is) to be bound&quot;.
Not that this has much bearing on how it's used in the modern scientific literature. I just thought it was cool.