Definition A explicitly talks about subsets of real numbers, but in fact is perfectly applicable to any partially ordered set. By contrast, your Definition B does not explicitly say it is about real numbers, but in fact is only about subsets of the entire real numbers with the usual ordering.
In fact, we don't just talk about "least upper bound" when dealing with partially ordered sets, we talk about "least upper bound in $X$".
Your argument for equivalence assumes in fact that you are dealing with all of $\mathbb{R}$: to see how it can fail, consider the totally ordered subset of the real numbers given by $X=[0,1)\cup\{2\}$. Let $S=[0,1)$. Then $\{2\}$ is a least upper for $S$ in $X$, but your argument breaks down, since for $\epsilon=\frac{1}{2}$ we have that every $s\in S$ satisfies $s\leq 2-\frac{1}{2}$; yet $2$ is the least upper bound of the set $S$ in $X$, even though it does not satisfy Definition 2. The reason is that although, within the set of real numbers, $2-\epsilon$ "works" as an upper bound for $S$, this element is not in $X$; not being a member of the club of elements of $X$, it does not qualify to be a least upper bound in $X$, let alone the least upper bound.
So, definition A is valid in arbitrary partially ordered sets. Definition B is only equivalent to Definition A in some contexts, e.g., when dealing with the set of all real numbers in their usual ordering.
As far as what your lecturer said, it's hard to go by second-hand reports. It is possible that he said that in a partially ordered set $X$, a subset $S$ may have more than one minimal upper bound: an element $b\in X$ is a minimal upper bound for $S$ if and only if $s\leq b$ for all $s\in S$, and if $a$ is an upper bound for $S$ and $a\leq b$, then $a=b$.
As to your example, it does not really work because "$a-\epsilon$" has no inherent meaning; it can only mean something if you have an operation defined that allows you to subtract $\epsilon$ from $a$; since your $a$ and $b$ are not actually a real numbers (at least, not under the usual ordering) you cannot talk about $a-\epsilon$ directly; you have to explain what that means. And I would say that $a$ and $b$ are minimal upper bounds rather than "least upper bounds", since they both fail Definition A (which is the one that is applicable in generality).
I also want to note that your argument that Definition A and B are equivalent is badly phrased (possibly because you are talking about (1) and (2) and don't specify if you are talking about definition A or definition B). You should assume that $b$ satisfies (A) and prove that it satisfies (B) (you essentially do this, but you are assuming that your set is all of $\mathbb{R}$, or at least dense), and then assume that $b$ satisfies (B) and prove it satisfies (A).
These two definitions are equivalent - at least, under the additional assumption that the lattice $M$ itself is nonempty. (Some texts require structures, such as lattices, to be nonempty - but not all do!) The point is that, switching sups and infs, $M$ itself can do what we want $\emptyset$ to do (so to speak): the supremum of the emptyset is the infimum of the whole lattice, and similarly the infimum of the emptyset is the supremum of the whole lattice.
Note that the "inf/sup switch" here is crucial: in a semilattice context we do indeed get two different notions which differ only by the requirement of a greatest/least element (depending on whether we're looking at complete upper or complete lower semilattices). But with both sups and infs, the two definitions in the OP coincide.
Best Answer
A set can have multiple upper bounds. Take for instance the interval $T = (0,1)$, while $S = \mathbb{R}$. Then 1 is an upper bound for $T$, but for instance 2 is also an upper bound. Actually, all $M \geq 1$ are an upper bound of $T$.
Now, the supremum of $T$ is the smallest upper bound of the set $T$, which in the example above is 1. Item (2) of the definition is used to guarantee this: it says that c should be less than any other upper bound of $T$.