Of course you can. It's kind of a dick move, but your ultimate responsibility is to yourself and your career.
I would handle it diplomatically but firmly, and stress to Company A that it has nothing to do with them, and that you'd love to maintain a relationship despite the awkward position you've put them in.