Question: Did Adam and Eve have the ability to distinguish the differences between good and evil? And did they have true "knowledge" before they disobeyed God?
Answer: Greetings friend. Thank you for asking such an interesting question. Who wouldn't want to crawl into Adam's head for a while? What was it like to know God personally on an Edenic level? Did the forbidden fruit pull at him in spite of his positional purity? What did it feel like when he looked over his shoulder while leaving the garden? There's so much we'll never know—not while we remain here on earth anyway. We do, however, have enough information to sort a few things out. So, let's do that.
Since you used the phrase "good and evil," we should begin by getting our terms straight, because the term evil in the Bible does not always refer to sin. In contemporary usage (and as evidenced by your use of the contrasting couplet "good and evil") the word evil is roughly equivalent to the words sin and wickedness. But if evil meant that in the Bible, then God would be in trouble.
“I form the light, and create darkness: I make peace, and create evil: I the Lord do all these things.”
(Isaiah 45:7, KJV).
There you have it. God creates evil! What this tidbit tells us is that, whatever evil means, it does not mean sin, because God is no sinner (by definition) nor does he create sin. The word evil in this verse is the Hebrew word [ra'], which merely means something "not good." For instance, when a child misbehaves, he might get a spanking. That spanking would be [ra'] although the more mature among us know that correction is actually a good thing and not a wicked thing. In like manner, God's corrective forces are often called evil, and although unpleasant, we can see where they are (of necessity) good, coming from God. The following verse illustrates just that.
“Correction is grievous unto him that forsaketh the way: And he that hateth reproof shall die.”
(Proverbs 15:10, KJV).
The word grievous in Proverbs 15:10 is that same Hebrew word [ra']—the one often translated as evil. Here we begin to see the biblical meaning of the word. Although [ra'] never describes pleasantness, it usually describes a God-ordained activity. Although these activities of correction are often the result of sin, they are not themselves sin. But the word [ra'] does not always refer to troubles that are the result of sin. It often refers to a much more generic badness as shown in the two verses below.
“Blessed is he that considereth the poor: The Lord will deliver him in time of trouble.” (Psalm 41:1, KJV).
“One basket had very good figs, even like the figs that are first ripe: and the other basket had very naughty figs, which could not be eaten, they were so bad.” (Jeremiah 24:2, KJV).
In the above verses, trouble and bad (as in rotted) show particularly well that these goings-on are merely generically bad, and that they are neither sinful nor wicked. Biblical evil is variously translated as spoiled, bad, adversity, trouble, sinful, misfortune, calamity, natural disasters, or suffering. By these renderings it is quite clear that word evil in the Bible does not usually refer to wickedness.
With all that in place, I'll address the direct concerns of your question, whether or not the first couple knew (in a real way) the difference between true goodness and sin (dodging the word evil for obvious reasons).
Sin predated Adam and Eve. Not human sin, but sin. Satan rebelled against God at an unknown date before the creation of humankind. By the time the first couple hit their stride, Satan was already acting in sin. But it was human sin that God had in view—even before the foundations of the world. God's plan of redemption (which is his program for dealing with human sin) was established way before the first human ever sinned. We see this in the person of Jesus Christ.
“He [Jesus] was foreknown before the foundation of the world but was made manifest in the last times for the sake of you” (1 Peter 1:20, ESV).
I do not believe that there was any essential difference in Adam and Eve's knowledge of sin before as compared to after the fall. They knew that eating of that fruit was a violation of God's will. He drew a line in the mulch (if you will), and they crossed over into sin. The very fact that God set it up this way, that he issued a clearly stated limit with a clearly stated punishment for violating that limit, tells me that the first couple's knowledge was "true" enough for God. If it weren't true, then God would be guilty of setting-up a must-fail situation.
“And the Lord God commanded the man, saying, “You may surely eat of every tree of the garden, but of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall surely die.”” (Genesis 2:16–17, ESV).
I feel very strongly that God's decision to create volitional beings (both we and the angels have volition) rather than robot-like beings who could only respond positively to him, was tantamount to a decision to allow sin into the world. Make no mistake, God did not create sin. But his insistence that love be genuine (for true love cannot be coerced) comes with the risk of rejection, and rejecting God was the first sin. Satan did that. Then Adam and Eve did it. And we do it. Rejecting God is not only sin, it is also the overarching category of all sins.
I do see some differences between their pre and post fall relationship to sin, however. Before the fall, the first couple had an academic knowledge of sin and its fallout. But after they sinned, they knew it differently. They "married" sin and consummated their relationship with it in the same sense where the Bible says that Adam "knew" his wife. After Adam had intimate relations with Eve, he knew her in a whole new way. So, when they both "knew" sin, they knew it in a way that they hadn't known it before. And just like the consummation of a marriage, the consummation of sin cannot be undone. We are the offspring of two consummations: the physical union of our first parents, and their union with sin.
I believe that if Adam and Eve had persevered in innocence, and after enduring many trials, that God would have given them to eat of both trees: The Tree of Knowledge and the Tree of Life, and that humanity (if there were to be subsequent humans) would have a totally different history. Because, just as Adam's sin was imputed to all of his offspring, so would be his righteousness...if he pulled it off. Unfortunately, we cannot turn back the clock, nor can we run alternate scenarios except in our imaginations. God's plan for the redemption of humankind is in play. All we who find our righteousness in Jesus Christ will be glorified eventually! And that in itself is the most wonderful news ever. It is difficult, however, to consider the lives of our first parents without considering the cost of that one bad decision, and that should give us pause. We, too, decide for others.