I had to do some digging a few years back for similar reasons for this paper: https://cmuc.karlin.mff.cuni.cz/pdf/cmuc1702/clontz.pdf (see section 4)
A subset $Y$ of $X$ is relatively compact to $X$ if for every open cover of $X$, there exists a finite subcollection which covers $Y$.
A subset $Y$ of $X$ is precompact in $X$ if $\operatorname{cl}_X(Y)$ is compact.
Note that every precompact set is relatively compact, and we get the converse for regular spaces (Prop 4.4).
Without regularity these are distinct. Let $X$ be the real line with the topology generated by sets of the form $(a,b)$ and $(a,b)\setminus\mathbb Q$ (example 5.8). This is a refinement of a Hausdorff space and is thus Hausdorff. Then $[-1,1]\setminus\mathbb Q$ is relatively compact to $X$, but not precompact: its closure is $[-1,1]$, which is not compact as it contains the closed infinite discrete set $[-1,1]\cap\mathbb Q$.
However, you're asking about this:
- A subset $Y$ of $X$ is $(\star)$ in $X$ if it is contained in some compact $K\subseteq X$.
We see then that every precompact set is $(\star)$, and every $(\star)$ set is relatively compact. It follows that all three are equivalent under regularity.
Note our example $[-1,1]\setminus\mathbb Q$ is not $(\star)$ in $X$ as compacts in $X$ are nowhere dense in $\mathbb R$ and thus cannot contain the set $[-1,1]\setminus\mathbb Q$.
So then, might $(\star)$ and precompact be equivalent? This is true for Hausdorff (more generally, KC (P100)) spaces: given a ($\star$) in $X$ set $Y$, its compact $K\supseteq Y$ is closed, so $\operatorname{cl}_X(Y)\subseteq K$ is compact. So we'd require a counterexample to be both non-Hausdorff and non-regular.
Note that every compact subset is $(\star)$; therefore every finite subset is $(\star)$. Consider the particular point topology on $\mathbb Z$ (S8): the non-empty open sets are exactly the sets that contain $0$. Then $\{0\}$ is $(\star)$ because it is finite. But $\operatorname{cl}(\{0\})=\mathbb Z$, which is not compact as $\mathbb Z\setminus\{0\}$ is a closed infinite discrete subset.
We can improve this to a $T_1$ (but not $T_2$, or even US (P99)) space. Consider the union $X=A\cup B$ of disjoint infinite sets $A,B$ where non-empty sets are open provided they contain a cofinite subset of $A$. Then A is compact and thus $(\star)$ in $X$, but its closure is the whole space $X$ which contains the infinite closed discrete subset $B$. (It'd be nice to obtain a US, if not weak Hausdorff (P143), example.)
Which I guess is a very long way of saying, I don't think I've exactly seen $(\star)$ or an equivalent notion named in the literature, but here's some related ideas at least. :-) If you want to give it a name, perhaps "antecompact" would be a cute choice?