Let $A$ be an Artin $k$-algebra for a commutative artinian ring $k$ (e.g. $A$ is a finite dimensional algebra over a field $k$). Let $X,Y$ be finite length left $A$-modules. If $\text{Hom}_A(X,Y)$ is generated by $f$ (respectively $g$) as an $\text{End}_A(Y)$-$\text{End}_A(X)^\text{op}$-bimodule, does it follow that $f = \beta g \alpha$ for isomorphisms $\alpha \colon X \rightarrow X$ and $\beta \colon Y \rightarrow Y$? This seems to be the case in every example that I have considered.
EDIT: The statement as above is wrong, see the answer of Dave Benson. Instead of requiring that $\text{Hom}_A(X,Y)$ is generated by $f$ (respectively $g$) as an $\text{End}_A(Y)$-$\text{End}_A(X)^\text{op}$-bimodule, I actually want to require that every element in $\text{Hom}_A(X,Y)$ is of the form $f\alpha'+\beta'f$ for some $\alpha' \colon X \rightarrow X$ and $\beta' \colon Y \rightarrow Y$ (same for $g$). Does the implication hold in this case?