Assuming I am in the US and buy a return ticket from the US to anywhere, but my visa doesn’t allow me to re-enter the US, and I will just skip the return leg.
Can I be denied boarding on the outbound flight?
Probably yes (they can deny you.)
Whenever I leave the US, the airline always asks for my status for the return flight before giving me a boarding pass. I have to prove them that I have the necessary papers to come back. The only possible reason for that check is your question.
Details: I have a roundtrip ticket for non-stop flights from the US to country X and back, and I am a citizen of X. When I show my passport from X, they ask about my authorization for the US for the return trip. That obviously cannot be related to the outbound trip.
I have been in this situation quite a few times. Back when getting a Chinese visa would take only a few hours, and could be applied for just about anywhere (not just your country of residence), I would book a China<>Somewhere ticket, knowing that my visa expired before I came back to China, and that I would get a new Chinese visa.
Never had a problem. The airlines were only concerned, during check-in for the outbound flight, whether I had everything need to enter the country of destination.