Thanks for your question.
I'm sorry to hear about what you're going through with your husband. Typically in order for something to be considered an "affair" there has to be something physical or emotional going on. After what you've described, it did
sound to me like there is a high likelihood that your husband was having an emotional affair even if there was nothing physical going on. Even if that is not the case, your husband has been continuously lying to you and betraying your trust, so whether or not this is technically considered an affair, the violation of your trust and the damage that something like that can cause is the same.
As far as boundaries for cross gender friendships, the most important thing is simply being honest and upfront about them. As long as your husband is honest, and you are comfortable with the decisions that he is making and who he is spending time with, then there's nothing wrong with him having friends of the opposite sex. Now that this has happen, it would be understandable if it took some time to build up that level of trust with you again before that happens. If this friend of his knew that he was deceiving you about their relationship together, then I agree that this person behaved dishonestly and selfishly.
As long as your husband genuinely wants to repair the problems that this has caused, that it a good sign if you are still willing to work on the relationship. I know you mentioned that you've been to individual counseling, and if you continue to struggle with these problems with your husband I would certainly recommend having him come with you for some couples counseling sections, or find a seperate marriage counselor. Regardless of whether you can call this an "affair" in the classic sense of the word, the breach of trust and issues that result from it are the same, and you have every right to feel the way that you do. I definitely wish you the best with all of this, and if there's anything else I can do to help just let me know.