Lets assume that the last remaining shareholder of Apple made the choice to sell his share to the company for $1 (not a very logical choice). The company still needs shareholders to operate and so the board would need to issue new shares. At that point the could simply grant them to themselves and take control of the company.
There are other corporate structures that don't require shareholders for things like trusts, non-profits, member controlled companies and cooperatives.
But it's still possible to own, sell, or give away the shares privately.
It just means any dealings are by private agreement, and not open to public trade or analyst scrutiny.
This also means the value is more likely to be estimated by relying on business fundamentals and perhaps some aggressive haggling, and not on public market sentiment.