Even when words have meanings that span semantic ranges in other languages (such as how both Hebrew and Greek use the same words for wife and woman), context is key to understanding the meaning. In fact, words rarely map one-to-one across languages. This is why mechanical translations don't work for the final copy. Take Jesus' words for example:
But I say to you that whoever looks at a woman to desire her has already committed adultery with her in his heart. (Matthew 5:28 NET)
The first thing to note is that Jesus says "looks at a woman to desire her." That phrase "desire her" is a very important part of the teaching. It is not a sin to see women in general. It is a sin to look upon them with lust.
Here we see that those who look with lust have committed adultery in their heart. Adultery means to "have sexual relations with someone you are not married to and either you or the partner are married." You cannot commit adultery with your spouse. Therefore, Jesus is not using the word in the sense of wife here.
One might argue that it still means wife, merely another person's wife. Then the verse would mean "whoever looks at another man's wife to desire her...." However, in both Greek and Hebrew to differentiate between wife and woman, possessives would be used. If Jesus meant "another person's wife," He would have specifically stated "another man's wife." By not using the possessive, Jesus shows us that He means to use the word as "woman." But that does not mean one can look upon another person's wife to desire her. She still isn't "your woman."
Likewise with Paul, the context shows that he is using the term in the sense of marriage. The use of possessives helps us here where the lack of possessives helped with Jesus' words.
But because of immoralities, each man should have relations with his own wife and each woman with her own husband. (1 Corinthians 7:2 NET)
Paul says here that having sexual relations with your wife/woman (or man/husband for women) will avoid immorality. As ScottS points out, the use of a possessive on both of those limits the meaning from woman/man to wife/husband. The question is, what is immorality according to Paul?
According to Thayer's Lexicon, the word Paul uses means "illicit sexual intercourse." Reading that meaning in the verse shows us that Paul wants people to avoid illicit sexual intercourse so he gives them instructions on how to do so. Those instructions are that each man should have his own wife/woman and each woman should have her own man/husband.
To see that Paul is referring to marriage here, look down at 1 Corinthians 7:9:
But if they do not have self-control, let them get married. For it is better to marry than to burn with sexual desire [NET]
The word for "get married" means exactly that. Unpacking the passage shows that to avoid illicit sexual intercourse, a couple should get married. Therefore, even if the possessives had not been used, we would still know that Paul's use of woman/wife in 7:2 means "wife" not simply "woman."