"I love you but I'm not in love with you."
That's usually the first evidence a loyal spouse has that their spouse has been having an affair. Oh there may have been suspicion or the inkling that things weren't right, but these are the words that confirm the loyal spouse's worst fears: their spouse has been unfaithful.
But what exactly IS an affair? At first a person might be tempted to say it's having sex with someone other than your spouse, but what about instances then of a wife who grows close to and fond of the man at work? Are they really "just friends"? If we then say that it's having an emotional attachment to someone other your spouse--well we are emotionally attached to our pets! So that not really quite accurate either. Could we maybe say it's having an emotional and sexual relationship with someone other than your spouse? Then what about a one-night stand? There's not usually an emotional attachment there. And with the advent of the internet and iPhones, what about cybersex and "sexting"? The definition of what exactly is and is not an affair can be complicated!
What may be more profitable would be to look at the definition of faithful. According to Merriam-Webster, the definition of faithful is "Steadfast in affection or allegiance--loyal; Firm in adherence to promises or in observance of duty." The definition of loyal says "faithful to a private person to whom fidelity is due." From these two definitions we can learn and conclude that being UN-faithful--having an affair--might rather accurately be defined as "acting in a way so that affection and loyalty are not committed and dedicated to a private person to whom loyalty is due; not adhering to promises (vows)."
Marrying someone is voluntary and if you look at it from a legal standpoint, marrying someone is a contract. Each party makes certain promises to the other, and those promises are spoken in our vows. Most wedding vows in the USA say something like this: "I take you to be my lawfully wedded spouse for better or worse, for richer or poorer, in sickness and in health, to love and to cherish forsaking all others you as long as we both shall live." This means that the two people getting married volunteer to share themselves with each other openly and intimately through all the circumstances that come along in life, as long as they are both alive.
So rather than nitpicking over whether it's "okay" to have a friend of the opposite sex, or critiquing the definition of what is or is not an affair, let's consider this. Are you acting in a way so that your affection and loyalty are committed and dedicated to one person to whom you vowed all of your affection and loyalty? If your answer is no, then it may be an affair.