My question is related to this one. I would like to know what extra conditions a locally compact (but not compact), Hausdorff space should satisfy such that in its one point compactification the point at infinity has a contractible open neighborhood?
One-point compactification and the existence of a contractible open neighborhood of infinity
algebraic-topologycompactificationgeneral-topology
Related Solutions
If we take your definition ($Y$ compact Hausdorff and $y_0 \in Y$ such that $i: X \rightarrow Y \setminus \{y_0\}$ is a homeomorphism), the answer is clear:
$i[X] = Y \setminus \{y_0\} \subset Y$ is compact and hence closed in $Y$ (as $Y$ is Hausdorff), and so $\{y_0\}$ is open (i.e. $y_0$ is an isolated point of $Y$). So $Y$ then consists of a (closed) topological copy of $X$ (namely $Y \setminus \{y_0\}$) and an isolated point $y_0$. Indeed $i[X]$ is not dense in $Y$. So indeed this is incompatible with the usual definition of a compactification:
Commonly, a (Hausdorff) compactification of a space $X$ is a pair $(Y, i)$ where $Y$ is compact Hausdorff and $i : X \rightarrow Y$ is an embedding (or equivalently, $i$ is a homeomorphism between $X$ and $i[X] \subset Y$) and $i[X]$ is dense in $Y$. In this definition, a one-point compactification $X$ is a Hausdorff compactification $(Y,i)$ such that moreover $Y \setminus i[X]$ is a singleton.
Two compactications $(Y,i)$ and $(Y',i')$ of $X$ are called equivalent when there is a homeomorphism $h: Y \rightarrow Y'$ such that $h \circ i = i'$ as maps on $X$. One then shows that $X$ has a one-point compactification iff $X$ is locally compact Hausdorff and non-compact and moreover all of them are equivalent in the above sense.
In this general definition, if $X$ is compact and $(Y,i)$ is a Hausdorff compactification, $i[X]$ is compact and so closed, so it can only be dense in $Y$, $i[X] = Y$ and $Y$ is just a homeomorph of $X$. So there is no one-point Hausdorff compactification, in the general sense, when $X$ is already compact.
So maybe your text does not use the more common definition that includes denseness, or it implicitly assumes all considered spaces are non-compact, in which case we have no problem.
For any space $X$ we can construct a space $\alpha(X)$, the Aleksandrov extension of $X$ by defining a space $Y$ as Munkres does with the extra provision that we take all complements of closed compact subsets of $X$ as the extra neighbourhoods for $\infty$. One can easily check that $\alpha(X)$ is then compact.
The "closed" is needed in general because if e.g. $X$ is not Hausdorff it could have some compact subset $K$ which is not closed, and then (if we were to omit the closed condition) $(X\setminus K) \cup \{\infty\}$ would be open while its intersection with $X$ would be $X\setminus K$, which was not open, so if we left out the closed condition $X$ would not have the same topology as a subspace of $\alpha(X)$ as originally, going against the idea of an extension/compactification: we want to embed $X$ in a larger space with better properties, so in the larger space it should be a subspace with the same topology that it had originally.
If we want $Y = \alpha(X)$ to be Hausdorff, (so in particular $X$ should then be Hausdorff, as a subspace of $Y$) we need to be able to separate $\infty$ from every point $x$ in $X$. As a neighbourhood of $\infty$ is of the form $\{\infty\} \cup X \setminus C$, with $C$ compact and closed, every point $x$ should then have a neighbourhood that sits inside a compact closed set, i.e. $X$ must be locally compact.
So $\alpha(X)$ can always be defined such that $\alpha(X)\setminus X$ is a point and $X$ is a subspace of $\alpha(X)$ and it is always compact (regardless of $X$) but $\alpha(X)$ is Hausdorff iff $X$ is locally compact and Hausdorff. A special case is when $X$ is already Hausdorff and compact, in which case we add an isolated point $\infty$ (as $X$ can be taken as $C$, a compact closed subset) and we get that $X$ is not dense in $\alpha(X)$.
Normally we only consider Hausdorff compactifications and in that case the local compactness is needed for the Hausdorffness of the construction $\alpha(X)$. And also because then $X$ is an open subset of a compact Hausdorff space and thus locally compact for that reason.
Best Answer
I doubt that there exists a reasonable condition on $X$ assuring that $\infty$ has some contractible neighborhood in $X^+$. Hatcher's requirement is that $\infty$ has a neighborhood in $X^+$ that is a cone with $\infty$ the cone point. This is a very special neighborhood as it assures the existence of arbitrary small contractible neighborhoods of $\infty$. If the latter holds, let us say that $X$ satisfies the ASCN-condition (this is only an adhoc notation).
In fact, it is precisely the ASCN-condition which is needed to prove $H^n_c(X)\cong H^n(X^+,\infty)$ where $X^+$ is the one-point compactification (see the comments to this question).
The existence of a "cone neighborhood" is just a convenient sufficient (but not necessary) criterion to enforce the ASCN-condition. Note that if there exists a compact cone neigborhood $U \approx CZ$ (which implies that the base $Z$ is compact), then $X$ must be $\sigma$-compact. That is, $X$ is the union of countably many compact subsets. To see this, observe that $U \backslash \{ \infty \} \approx Z \times [0,1)$ is the union of countably many compact sets.
Here is a criterion on $X$ which implies that the ASCN-condition is satisfied:
There exists a sequence of $K_n \subset X$ such that the closure $\overline{K}_n$ is compact with $\overline{K}_n \subset int(K_{n+1})$ and $\bigcup_{n=1}^\infty K_n = X$ and such that for each $n$ there exists a homotopy $H^n : (X \backslash K_n) \times [1-\frac{1}{n},1-\frac{1}{n+1}] \to X \backslash K_n$ with the following properties:
a) $H^n$ is stationary on $X \backslash K_{n+2}$
b) $H^n_t = id$ for $t = 1-\frac{1}{n}$
c) $H^n_1t(X \backslash K_n) \subset X \backslash K_{n+1}$ for $t = 1-\frac{1}{n+1}$
These conditions allow us to paste the $H^n$ to a homotopy $H : (X^+ \backslash K_1) \times I \to X^+ \backslash K_1$ with the following properties:
a) $H((X^+ \backslash K_n) \times [1-\frac{1}{n},1]) \subset X^+ \backslash K_n$
b) $H_1(X^+ \backslash K_1) = \{ \infty \}$.
This shows that the ASCN-condition is satisfied. Note that our criterion is more general than the existence of a cone neighborhood. However, it also applies only to $\sigma$-compact $X$.