In this paper, we introduce a new notion in a semigroup $S$ as an extension of Mary's inverse. Let $a,d\in S$. An element $a$ is called left (resp. right) invertible along $d$ if there exists $b\in S$ such that $bad=d$ (resp. $dab=b$) and $b\leq_\mathcal{L}d$ (resp. $b\leq_\mathcal{R}d$). An existence criterion of this type inverse is derived. Moreover, several characterizations of left (right) regularity, left (right) $\pi$-regularity and left (right) $*$-regularity are given in a semigroup. Further, another existence criterion of this type inverse is given by means of a left (right) invertibility of certain elements in a ring. Finally we study the (left, right) inverse along a product in a ring, and, as an application, Mary's inverse alon...