This is a theoretical question, but I am curious of the process. Let's say the owner of a major league ball club is driving around somewhere and sees a baseball game happening on the streets where a pitcher is throwing 250mph (yes I know not possible, but this is to exaggerate his skills). So obviously the owner is very intrigued and finds out the guy is just a regular guy who never played any organized baseball. Could that owner just sign him right there if he wanted to? Does he have to get drafted?
While there are some rules about age and college attendance, if the player is not in any of those groups, any team can sign him (or her) as an undrafted free agent. It actually happens from time to time. The examples I found are players who were in the drafts, but never got picked. In fact, this is a very common entrance method; as those rules above show, players from outside an "extended area" of the US do not enter the MLB draft, but can be signed directly.