In my analysis textbook, there's a section about totally ordered Abelian groups, and there's a definition of density, which goes as follows:
A subset $A \subset G$ of a totally ordered Abelian group $G$ is dense in the set $B \subset G$, where $A \subset B$, if for each $x, y \in B$, there exists an $a \in A$ such that $x<a<y$.
Shortly afterwards, there's an exercise which requires us to prove that this definition of density in the totally ordered Abelian group $(\mathbb{R}, +, \leq)$ is equivalent to the topological one, in the standard topology induced by the Euclidean metric (the one that states that the closure of $A$ contains $B$).
I went through about half of the proof, observing the set $S=\{x \in \mathbb{R} | x \in (b_{1}, b) \cap A\}$, where $b_{1}, b \in B, b_{1}<b$, and taking $s=\sup S$, and noticing that if I were able to prove $s \in B$, the proof would be complete, because if $s<b$ held, then there would be another $a \in A$, and therefore $a \in B$, such that $s<a<b$, which would be a contradiction. Therefore, $s=b$, and so since $s$ is a limit point of $A$, $b$ must be a limit point of $A$, therefore $b$ is in the closure of $A$.
However, I noticed a counterexample: $A = (-\infty, 5) \cup (7, +\infty)$, $B=(-\infty, 5)\cup \{6\} \cup (7, +\infty)$, where the closure of A is equal to $(-\infty, 5] \cup [7, +\infty)$, and does not contain $B$. However, the first definition of density clearly holds in this case.
I wasn't quite sure how to tag this, so please tell me if I should add/remove any tags.
Your counterexample is sound. Probably the question was proving that a subset $A$ of $\mathbb{R}$ is “topologically dense” if and only if it is “order dense”.
To wit, suppose $A$ is order dense in $\mathbb{R}$. If $x\notin\bar{A}$, then there exists a neighborhood $(x-\delta,x+\delta)$ of $x$ (with $\delta>0$) such that $(x-\delta,x+\delta)=\emptyset$. But order density implies there is $a\in A$ with $x-\delta/2<a<x+\delta/2$, contradiction.
Suppose $A$ is topologically dense in $\mathbb{R}$. If $x<y$, then $(x,y)\cap A\ne\emptyset$, so $A$ is order dense.