That is called prior art and it is discovered in a patent search. If it is over 20 years old and hasn't been extended, it may be available for use. You just can't patent it. I sound way too much like an attorney here (which I am not) however they will sue at the drop of a hat. Hence the word "may" and a disclaimer that this is NOT in any way legal advice or advisement.
"Of course you own your own idea until you disclose it to anyone else."
Au contraire. You might have an idea and never disclose it to anyone else, only to discover that someone else (or others) have independently discovered it - even if you never talk about it. Then whose is it?
This is (in part) why "intellectual property" is an oxymoron. It is like talking about "square circles". There is no such thing as "intellectual property". It is in the same category (to relate it to the season) as Santa Claus.
Your point about yet another aspect of the unworkability of patents is more evidence that patents are a bad idea that only "seemed like a good idea at the time" of Thomas Jefferson. Like most bright innovations in human social institutions, some of the flaws are as follows:
1. Nobody owns ideas. They are part of the intellectual commons of civilization. The Asians understood this well before Western influence. New ideas are discovered and were consequently there all along.
2. Ideas and working implementations differ only by degree, not kind. Software algorithms and DNA are patentable yet are based directly on general principles hard to distinguish from specific instances of their application.
3. Only novel ideas can be patented, yet who is to say what is novel? What is novel to an idiot is obvious to a genius.
4. How much must an idea differ from an existing patent to be different? What is the same to one is different to another.
5. The patent involves law and thus gives government a nexus for control of the use of ideas - a form of mind control.
6. Property cannot be "intellectual". If one person has it and gives it to another, both have it. Property by definition is mutually exclusive as to who owns it. "This is mine; that is thine."
7. What constitutes public disclosure? If it is defined by law, then one is made subject to a legal procedure in order to freely use one's own idea without the risk that someone else will patent it upon discovery. And what constitutes a public disclosure? There are plenty of obscure publications and websites out there nowadays.
8. Patents discourage innovation. Without patents, ideas can be freely discussed and refined, but with them, ideas are subject to secrecy before patent disclosure. The patent relates ideas to wealth, creating a protective milieu for ideas which otherwise is open and free.
9. The patent office putatively decides what reality is as they have suppressed patents for genuine inventions.
10. Patents teach behavior contrary to fundamental institutions of civilization, such as schools, for which the free exchange of knowledge is encouraged as well as its use, which is often the purpose of the exchange.
Re: Patents were originally to encourage innovation.
I believe one gets more "original" patentable ideas the less one knows about any particular subject. I recall a young engineer who was excited because he had come up with a way to implement a simple current limiter circuit using a couple of active (nmos devices) and a resistor. He showed me the circuit as he was ready to apply for a patent. I didn't have the heart to tell him that one of the original OP Amp designs (circa..uA741 ~1969) had such a circuit for its output current limiting function. Hopefully, he found out before he spent more time and effort ...