I think it depends on a couple of factors:
- your exact wording (which you haven't quoted)
- your situation at B - how many other candidates there are, and how strong you look compared to others
Mentioning to HR that you have another offer should not be a problem in itself - every job seeker is looking for multiple options, just as well as every company is interviewing multiple candidates before hiring. And the better you are, the more options you have. So it might even increase your desirability, but certainly won't decrease it.
I think it is also OK to ask for a timeframe, you just need to be careful to avoid making the impression that you are pressurizing them for a decision. That would basically be the same trick as what HR at company A is playing with you when they say you need to decide about their offer by Wednesday. And since HR people all know this trick, most of them probably don't like it applied on them ;-) From what you describe, this may be interpreted by B in a bad way.
To make a decision, you need to rank your priorities. Is it more important for you to get a job fast, even if it is less than ideal, or are you looking for the best job you can get, even if it takes longer time to land in it? Assuming the latter, my suggestion is
Call back A and ask for more time to make a decision - you can even tell them straightforward that you have an upcoming interview with another company and you want to get the results before you commit yourself. That tells them you are not so easy to pressurize as you have at least one other option. If they insist on the Wednesday deadline, they probably don't really want you personally, only an easy hire who can be pressured to accept a less than ideal deal. If they really want you personally, they will probably be ready to wait for a few days.
(Of course, the risk here is if they have another candidate who is almost on par with you, they may decide to switch to him/her. However, they already chose you, and reversing their decision would increase cognitive dissonance, which most of us strives to avoid. So - at least temporarily - you have an advantage over other applicants even if originally they perceived only a slight difference between your aptitudes.)
Call back B and correct your earlier miscommunication. E.g. tell them that you really find their offer more fascinating and better suited to your skills and future plans, but you are pressurized by this other company to make a decision on their offer, this is why you would like to speed up the interview process at B. If they find you interesting enough compared to the other candidates, they will adapt to your needs at least somewhat. If not, you will get an early rejection which solves your dilemma.