I do not agree with you that the = operator is a contain comparison. Is is an equal comparison. the contents of statement on the left should be exactly the same as the right side of the = operator.
The scenario you mention is; //EntityA[EntityA_EntityB != id]
both != and = will test if there is an association and act upon. So in both cases there must be an association set. Otherwise the return of the XPath is false, in that case the tested record is not included. In human language it is; I want al EntityA records, which have an association to EntityB, but the id should not be 'x'
The not() function reverses the XPath. //EntityA[not(EntityA_EntityB = id)] is evaluated like; I want all EntityA records, but it should not have a association to EntityB record with id 'x'