Oneworld lounge access policy is, as others have stated, based on either class of service, or oneworld status with some exceptions for lounges that are outside the oneworld agreement (arrivals lounges, BA Concorde Room and QR LHR lounge) and 3rd party lounges. The QR DOH lounges have different arrangements, and there are restrictions on AA members when flying within North America.
This has been the case since at least 2008.
For the 3rd party lounges (for example the AF lounges used by QF at SFO or RJ/QR at ORD), you generally need to be flying on the carrier that contracts that lounge, but the same class of service or status rules apply in most cases.
In most cases, the lounge operator should be happy that other airline pax are coming. That means the airline gets paid (eg, if a QF pax uses a CX lounge at HKG, QF pays CX).
Some lounge agents might be confused if they haven't seen a boarding pass from that airline before or have problems finding the info they need on it.
I had a flight on QF connecting from MH in SIN shortly after the QF/EK tie up. MH issued a pass for the QF flight in KUL. QF lounge was closed when I got to SIN, so I thought I'd check the EK lounge. I had to point out the QF flight code to BNE because the agent thought I was on an MH flight.
Also once got into the CX SIN lounge using my baggage claim tag because no one would issue my connecting boarding pass as it was "too early".