Does osmosis occur when we have two different substances?
If A and B are at the same concentration there will be no net movement of water. 

Everything is down to diffusion. In your example of solution A/pure water, water molecules on both sides of the membrane are diffusing through the membrane to the other compartment. However the "concentration" of water is less in solution A, so the rate of movement is less from solution A to water than it is from water to solution A. Water will continue to move into the solution until another force, such as hydrostatic pressure, counteracts the "osmotic pressure".

If solution A and solution B have solute at the same concentration then the rate of movement of water will be the same in both directions, so no net movement will occur.

(In a typical experimental set up using dialysis membrane none of this would apply with the solutes that you mention since they would also be able to move through the pores and you would end up with perfect mixing. You would have to use macromolecular solutes.)