Friendship is a very important value – and challenge -- within Torah. See, for example, Avot 1:6,7; 2:13,14. The reality is that we do not live alone but, in fact, are social beings. We are meant to relate to others – and herein lies the value and the challenge. As social beings, we inherently affect and are affected by others – and this is part of the Divine plan in that our goal is not solely our personal development but the triumph of everyone’s development within a proper communal model. We thus must consider our relationships very carefully with a recognition that we have a responsibility for ourselves and others. We, thus, must ensure that our friendships affect us positively and not negatively while we also accept the obligation, to the best of our abilities, to affect others positively and not negatively.
When we reflect upon friendship, we, of course, must still consider our emotional feelings for each other. Friendship, in many ways, is clearly an alogical activity – who can truly say why we love or like another? The Torah perspective on friendship and relationships is not intended to change our human connections into solely a pragmatic activity whereby our only consideration is how we may benefit and receive benefit from another, albeit even of a spiritual nature. The reality is that we have connections with others and our emotions and familial connections inform us of the nature of these connections. This is part of the Divine plan. The further call, though, is to build upon these connections in the furtherance of the Divine plan – and so our emotions must translate into responsibilities.
Thus, in your particular case, you find yourself bonded in friendship to another with an immoral standard. The question is: how are you to respond in such a situation? The fact that you have a connection with this person means that this is a situation to which you must respond. You cannot simply walk away or ignore the responsibilities that go with the reality of this friendship. We have a responsibility to assist another in their moral challenges (Vayikra 19:17.18) and this is doubly so when we have a further, special bond with them. The issue is not simply whether you can be friends with this woman but how you should conduct this friendship. This is broader than the sole issue that you mention. It may be that you may not be able to change her conduct – but do not think solely in the short run. Maybe your friendship with her will eventually affect her positively in this regard over time. Maybe, still, it will never affect her in this particular way but your friendship will be positive for her in other ways and that also is important. You being a positive influence in your friend’s life has value.
There is, however, a limitation on this. You have to also be aware of the possibility of being a negative influence through your acquiescence of her behaviour. It may be that you cannot change her actions and it may be that you are a positive influence upon your friend in other ways but you must also be concerned that maintaining your friendship could give the impression that you are in agreement with her behaviour. There is also the possibility that others may interpret your friendship as a tacit approval of her behaviour. Giving a wrong impression is a negative value in its own right and it also has to be a consideration. It is always important that you are clear about your moral standards.
This leads into the other side of the issue – the effect of this relationship upon you. You also have a responsibility to yourself to maintain friendships with people who have a positive influence on your life. While you may think that you are not being affected by this woman’s negative behaviour, the reality is that one could be negatively affected by another’s actions in the most subtle of ways. Even simply tolerating the negative behaviour of others can have negative effects upon a person. There are many further ways that sharing a friendship with a person of poor moral stature can have negative effects on a person. Maintaining a friendship cannot override your duty to your own personal integrity and ethical standards and development.
So the answer to your question in terms of how Judaism would respond to such an issue is actually a most complex one. Every case is actually different based upon the actual personalities involved and the nature of the friendship and relationship. You are responsible for yourself and for others although the responsibility to self has priority in terms of personal, ethical development. You should not walk away unless you must but it is also important that, even if you maintain, the relationship, you never give the impression that you accept her negative behaviour. That may actually be a strain on the relationship but there is a greater good than the friendship and, although we value friendship, we are further committed to the greater Divine good.