I don't think anyone has ever demonstrated finding the entire public key—all (say) 2048 bits of n—but cryptographers demonstrated distinguishing public keys (popular exposition) by solving the German tank problem on ciphertexts to break the privacy claims of PLAID, the Protocol for Lightweight Authentication of IDentity developed by the Australian Department of Human Services.
The basic idea of PLAID is an identification protocol for smart cards: When you put your smart card into a legitimate hospital terminal, the terminal proves to the smart card that it represents legitimate hospital, and the smart card identifies you to the terminal, and then the terminal dispenses health care at you like a vending machine.
PLAID is intended to provide privacy from malicious terminals: If you put your smart card into a malicious terminal which cannot prove to your smart card that it represents a legitimate hospital, the terminal should be unable to distinguish your card from any other card.
However, in the protocol, the smart card sometimes reveals RSA ciphertexts under a public key n stored on the smart card—even to illegitimate terminals. Every ciphertext under the key n is a nonnegative integer c < n, but since n is different for each key, the upper bound on ciphertexts is different for each key.
Specifically, a malicious terminal can use the same methods used by British statisticians during World War II to estimate the number of German tanks by examining the serial numbers c of captured tanks which are all less than the total number n of tanks. The granularity of this estimate turns out to be enough to distinguish two smart cards' public keys simply by examining a sufficient number of ciphertexts made by them.
Not all public-key cryptosystems have this property—for example, most public-key encryption and signature schemes that rely on the difficulty of computing discrete logs in a single standard group, like X25519 or Ed25519, tend to naturally provide the various related notions of key privacy for public-key encryption, anonymous signatures, or key indistinguishability for signatures (paywall-free).
Therefore, an attacker able to break the cryptosystem with the public key can obtain it under the usual assumption of a few known plaintext/ciphertext pairs, then break the cryptosystem.
. This would tell me it is possible?