I disagree. If doing x is wrong but not a sin, or if doing x is wrong and sin, does not make a difference with either of these verses.
I'm obviously not explaining myself well. Let me back up from 1John and try another way.
As Rosangela referenced, John 9:41 tells us that an event can be a sin (or not) depending on one's level of knowledge (or ignorance). James 4:17 tells us also that what we know can determine whether or not a particular action is sin
for us. (See also Rom 3:20, 5:13, 7:8-9; 1Co 15:56.) When you know the difference between right and wrong, and you choose the wrong, you are guilty. When you have no light on the matter, guilt is not imputed to you.
This is how many people view sin. Here's one popular definition of sin:
To willfully violate God’s law. Sin is defined in terms of the subjective standard of what the sinner knows and what he chooses to do about it. In short,
sin is a choice.
If this is your definition of sin, then the answer is No. Action X may or may not be sin, depending on your knowledge of God's law and your choice to obey or disobey.
But that's not all there is to it. If it was, then Jesus would not have told the disciples to teach all nations. His commission might have been more like, "Do not tell anyone about the things I commanded you; they'll be saved anyway. I'll just teach them when they get to Heaven." There would be no arguments about salvation by faith vs. salvation by works; all would be agreed on salvation by ignorance.
Look at the sin offering described in Leviticus 4. Every sin there is an unintentional sin ("sin through ignorance" in KJV). But every sin there incurs guilt. And every sin there requires the blood of the lamb, which must be offered as soon as the sinner discovers his sin.
This sin is of a different nature from the "sin by choice" described above. In this case, sin is defined by God's objective, immutable law. Sin is sin, regardless of one's knowledge or ignorance. Therefore, the Lamb must die for the sin, whether or not the sinner knows about it. The only question is, "When will the sinner find out about his sin, and will he take advantage of the Lamb's blood?" In short,
sin is a state of being.
If this is your definition of sin, then the answer is Yes. Action X is a sin if it is wrong (i.e. incongruent with God's will).
Hope that clarifies.