Not an easy situation, but certainly not an uncommon one! Do you know for sure that she likes you? May want to find out first as perhaps she wants to text rather then use facebook because your ex is annoyed that the two of you are messaging in the first place!
If you do both really like each other then I would act on it, as it's inevitable that at some party or any time you spend alone will result in something happening. If you tell your ex your intentions then at least you've considered her feelings, as it would be worse if you kept it quiet from her after getting together with her friend.
I think Horatio has a point though, dating the ex of a friend, especially a close friend is a bit of a betrayal really. If she's willing to do that to he friend then you don't know how she may treat you, how would you feel if she broke up with you then started dating your best friend?
Either way I wish you good luck!