Yes, but you generally can't affect the rights of a third party through litigation, unless it involves the third party.
You can't really end run around this by doing it in the other direction, because it has the same effect - even though they could not hold apple in contempt, they could hold google, which has the same effect.
Again, it's gotten looser more recently, but forever, this was not okay, and the underlying precedent has not actually changed. Everyone does expect SCOTUS to make a statement case in the next few years about this.
In any case -
Imagine i ordered you not to have contact with your best friend, without them desiring this.
An argument that i've only enjoined you falls flat - at best, i've had serious affect on their constitutional right to free association, etc.
Saying "yeah but only you will get held in contempt" doesn't really work.
Apple can ask Google to do business, but Google will be under court order to respond, "Sorry, we can't."
In that situation, Apple would not have any obligations to the court. Google would be responsible for avoiding doing business with Apple.
Obviously, this would impact Apple's economic interests, so they want a seat at the table.