Here's a
synopsis of the draft rules. You'll see that once a player attends a 4 year college, he isn't eligible to be drafted until following his junior year or he turns 21. I believe there is a mechanism by which a player can formally abandon college eligibility, but it is not common. Frankly, a player who is not playing at a D3 should avoid even thinking of such an action. Assuming that he is attractive to pro teams, he would lose all leverage in negotiating with the team.
I don't know of an official definition of "gray shirt" but I believe that most people mean the term to refer to a player who graduated from high school, but chose to wait a year to enroll in a college.
Usually a player who is attending college but isn't competing in games is termed a red shirt.
A baseball player may try out with a pro team, although the exact rules depend on the NCAA division. He can't receive more than necessary expenses, and in D3/D2 the tryout must be outside baseball season (see article 12.2 in the NCAA Manuals for the rules regarding involvement with pro teams).
He may talk to scouts, and can even inquire with a pro team to find out his possible worth as a player.
However, he must not hire an agent, or have anybody else negotiate with a pro team on his behalf.