In Marx case - at least in your example - he is not using "contradiction" in a formal logic sense. He is using it in the sense of the contradicting forces of dialectical contradictions.
Marx specifically used different terms when referring to contradictions of formal logic.