So you have a semigroup (a single binary operation that is associative on your set $A$). The magic words are “congruence relation”, which are exactly what drhab gives in his answer. You can see a lot of this at play in this previous answer about groups.
Definition. Let $S$ be a semigroup. A congruence on $S$ is an equivalence relation $\sim$ on $S$ such that for all $x,y,x’,y’\in S$, if $x\sim x’$ and $y\sim y’$, then $xy\sim x’y’$.
Proposition. An equivalence relation on $S$ is a congruence if and only if, when considered a subset of $S\times S$, it is a subsemigroup of the latter under coordinatewise operation.
Proof. If $\sim$ is a congruence, then by definition the subset is closed under the coordinatewise operation, hence is a subsemigroup. Conversely, if an equivalence relation is a subsemigroup, then $x\sim x’$ and $y\sim y’$ mean $(x,x’),(y,y’)\in\sim$, and by closure we get $(xy,x’y’)=(x,x’)(y,y’)\in \sim$, hence $xy\sim x’y’$, hence $\sim$ is a congruence. $\Box$
Given an equivalence relation $\sim$ on $S$, let $S/\sim$ be the set of equivalence classes, and let $[s]$ denote the equivalence class of $s\in S$ under $\sim$.
Proposition. If $\sim$ is a congruence on $S$, then $S/\sim$ is a semigroup under the operation $[s][t]=[st]$.
Proof. The operation is well defined: if $[s]=[s’]$ and $[t]=[t’]$, then $s\sim s’$ and $t\sim t’$, hence $st\sim s’t’$, so $[st]=[s’t’]$. The operation is associative, as
$$([s][t])([v]) = [st][v] = [(st)v] = [s(tv)] = [s][tv] = [s]([t][v]).$$
Thus, $S/\sim$ is a semigroup. $\Box$
And conversely:
Theorem. Let $S$ be a semigroup, and let $\sim$ be an equivalence relation on $S$. Then the operation on $S/\sim$ given by $[s][t]=[st]$ is well-defined if and only if $\sim$ is a congruence on $S$.
Proof. That the operation is well-defined when $\sim$ is a congruence is given above. Conversely, assume the operation is well defined: that means that if $s\sim s’$ and $t\sim t’$, then $[st]=[s][t] = [s’][t]’] = [s’t’]$, hence $st\sim s’t’$, proving that $\sim$ is a congruence on $S$. $\Box$
Congruences play the role of normal subgroups for groups and two-sided ideals for rings in the context of general algebras, the study of Universal Algebra. The isomorphism theorems have counterparts for general algebras using congruences.
Thus, you don’t need this to be a monoid, or a group, for this to work; you just need a subsemigroup.