libcrypto3 provides a PEM_read_bio_PrivateKey as shown here
https://www.openssl.org/docs/man1.1.0/man3/PEM_read_bio_PrivateKey.html
I do not see a PEM_read_bio_PublicKey. There is a PEM_read_PUBKEY, but it expects a FILE* and not a BIO.
Obviously algorithm-specific read functions exist, but why is there no PEM_read_bio_PublicKey?
It's actually called
PEM_read_bio_PUBKEY, listed in the same man page: