Whenever I take $\beta X$ or other compactification of $X$, assume that $X$ is Tychonoff, otherwise it's not needed, in particular proposition 1 doesn't use that $X$ is Tychonoff.
To make this answer a little bit self-contained, let me first list some known facts without proof.
Basic definitions and facts:
Say $Z\subseteq X$ is a zero-set when there exists a continuous function $f:X\to\mathbb{R}$ with $Z = \{x\in X : f(x) = 0\}$. Any clopen set is a zero set.
Say $A\subseteq X$ is $C^\ast$-embedded when every bounded continuous function $f:A\to \mathbb{R}$ extends to $X$. Equivalently, any two disjoint zero sets $Z_0, Z_1\subseteq A$ of $A$ are contained in disjoint zero sets $Z_0', Z_1'\subseteq X$ of $X$, $Z_k\subseteq Z_k'$.
Stone-Cech compactification $\beta X$ of $X$ is the largest compactification of $X$ in the sense that if $Y$ is a compactification of $X$ then there exists a continuous map $\beta X\to Y$ extending the inclusion of $X$ into $Y$. Equivalently, it's the unique compactification of $X$ such that if $Z_0, Z_1\subseteq X$ are disjoint zero sets, then $\text{cl}_{\beta X} Z_0 \cap \text{cl}_{\beta X} Z_1 = \emptyset$. In particular, if $U\subseteq X$ is clopen in $X$ then $\text{cl}_{\beta X} U$ is clopen in $\beta X$.
Say a map $f:M\to N$ is irreducible it's surjective and maps proper closed subsets to proper closed subsets.
If $Z$ is a compactification of $X$ and $f:\beta X\to Z$ is the map extending the inclusion of $X$ into $Z$, then $f(\beta X\setminus X)\subseteq Z\setminus X$. This is a quite standard fact in study of compactifications, which holds because the function we are extending is a homeomorphism onto its image.
"Unique compactification" as always means uniqueness up to equivalence of compactifications, where two compactifications $Z_1, Z_2$ of $X$ are equivalent when there exists a homeomorphism $f:Z_1\to Z_2$ which maps $X$ to $X$. For the same reason we can talk about, for instance, the Stone-Cech compactification even though, of course, as sets they can be different. More generally there is a preorder on compactifications, where $Z_1\leq Z_2$ when there exists a continuous surjection $f:Z_2\to Z_1$ mapping $X$ to itself.
A subset $A\subseteq X$ is $C^\ast$-embedded if and only if $\text{cl}_{\beta X} A = \beta A$, in the sense that the inclusion $A\hookrightarrow \text{cl}_{\beta X} A$ works as the Stone-Cech compactification of $A$.
A space $X$ is called almost compact when it admits a unique compactification. Equivalently $|\beta X\setminus X|\leq 1$ (if a space admits the smallest compactification, then it's compact or admits the one-point compactification).
Say $A\subseteq X$ is locally dense if there is open $U\subseteq X$ with $A\subseteq U$ and $A$ dense in $U$. Equivalently, each $x\in A$ has a neighourhood $U_x$ such that $A\cap U_x$ is dense in $U_x$.
Most of those can be found in Rings of continuous functions by Gillman and Jerison.
Proposition 1. If $X$ is extremally disconnected and $A\subseteq X$ is locally dense, then $A$ is extremally disconnected $C^\ast$-embedded subspace of $X$.
Proof: It suffices to show this holds when $A$ is open and when $A$ is dense, since if $A\subseteq U\subseteq X$ where $U$ is open and $A$ is dense in $U$, then it follows that $U$ is an extremally disconnected $C^\ast$-embedded subset of $X$, and $A$ is an extremally disconnected $C^\ast$-embedded of $U$, and so it's also a $C^\ast$-embedded subset of $X$.
- $A$ is open $\implies$ $A$ is extremally disconnected
Let $V\subseteq A$ be open in $A$, then $\text{cl}_A V = A\cap \text{cl}_X V$ which is open in $A$ since $V$ is open in $X$.
- $A$ is dense $\implies$ $A$ is extremally disconnected.
Let $V\subseteq A$ be open in $A$ and $V = A\cap W$ where $W\subseteq X$ is open in $X$. Then $\text{cl}_A V = A\cap \text{cl}_X (A\cap W) = A\cap \text{cl}_X W$ is open in $A$.
- $A$ is open $\implies$ $A$ is $C^\ast$-embedded.
Take disjoint zero sets $Z_0, Z_1\subseteq A$ of $A$. We can find open set $V_0\subseteq A$ such that $Z_0\subseteq V_0$ and $\text{cl}_AV_0\cap Z_1 = \emptyset$ and so $\text{cl}_X V_0$ is a clopen set which separates $Z_0$ and $Z_1$.
- $A$ is dense $\implies$ $A$ is $C^\ast$-embedded.
Let $Z_0, Z_1\subseteq A$ be disjoint zero sets of $A$, and take disjoint open sets $Z_k\subseteq V_k$ of $A$ where $V_k = A\cap W_k$ and $W_k$ are open in $X$. Then $\text{cl}_X V_k = \text{cl}_X W_k$ is clopen so $\text{cl}_X V_0\cap \text{cl}_X V_1 \neq \emptyset$ would imply $A\cap \text{cl}_X V_0\cap \text{cl}_X V_1 = \text{cl}_A V_0\cap \text{cl}_A V_1 \neq \emptyset$ and so $V_0\cap V_1\neq \emptyset$, contradiction (more generally, disjoint open subsets of $A$ have disjoint open closures in $X$). It follows that $\text{cl}_X V_0$ is a clopen set separating $Z_0$ and $Z_1$. $\square$
Example. Proposition 1 doesn't hold for closed subspaces, one can show that $\beta\mathbb{N}\setminus \mathbb{N}$ is closed in $\beta\mathbb{N}$, $\beta\mathbb{N}$ is extremally disconnected, but $\beta\mathbb{N}\setminus\mathbb{N}$ is not extremally disconnected.
Proposition 2. $X$ is extremally disconnected iff $\beta X$ is extremally disconnected
Proof: If $\beta X$ is extremally disconnected, then $X$ is extremally disconnected from proposition 1.
Conversely if $X$ is extremally disconnected and $U\subseteq \beta X$ is open then $\text{cl}_X (U\cap X)$ is clopen in $X$ so that $$\text{cl}_{\beta X}(\text{cl}_X (U\cap X)) \supseteq \text{cl}_{\beta X} (U\cap X) = \text{cl}_{\beta X} U = \text{cl}_{\beta X}(\text{cl}_{\beta X} U)\supseteq \text{cl}_{\beta X}(X\cap \text{cl}_{\beta X}(U\cap X)) = \text{cl}_{\beta X}(\text{cl}_X (U\cap X))$$ which shows $\text{cl}_{\beta X} U = \text{cl}_{\beta X}(\text{cl}_X (U\cap X))$ is clopen as a closure of clopen set of $X$. $\square$
Theorem. The following are equivalent:
- $X$ admits an extremally disconnected compactification,
- $X$ is extremally disconnected,
- $\beta X$ is the unique extremally disconnected compactification of $X$.
Proof: If $X$ has an extremally disconnected compactification $Z$, then there is a map $f:\beta X\to Z$ extending the inclusion of $X$ into $Z$. We can find a closed set $K\subseteq \beta X$ such that $f\restriction_K:K\to Z$ is an irreducible map onto $Z$ (to see such $K$ exists, take minimal closed set $K$ such that $f(K) = Z$ using Zorn's lemma). Since $f(\beta X\setminus X)\subseteq Z\setminus X$ and $f\restriction_K$ is surjective, we need to have $X\subseteq K$, and so $K = \beta X$ since $K$ is closed. From theorem 2 of On irreducible maps and extremally disconnected spaces by Błaszczyk (Błaszczyk calls such maps completely irreducible), it follows that $f$ is injective and so a homeomorphism. Hence point $1$ implies point $3$, and the rest follows from proposition 2. $\square$
Corollary. The following are equivalent:
- Every compactification of $X$ is extremally disconnected,
- $X$ is an almost compact extremally disconnected space,
- $X\cong Z\setminus \{p\}$ where $p\in Z$ and $Z$ is a Stonean space.
Proof: Points $1$ and $2$ are equivalent from above theorem. If $2$ is true and $X$ is not compact, we can take $Z = \beta X$ and $p\in \beta X\setminus X$. If $X$ is compact, take $Z = X\sqcup \{p\}$ to be disjoint union of $X$ and singleton $\{p\}$.
Conversely, if $Z$ is Stonean and $p\in Z$, then $X = Z\setminus \{p\}$ is extremally disconnected and $C^\ast$-embedded in $Z$ from proposition 1, and so either $\beta X = X$ or $\beta X = Z$. $\square$
The equivalence between point $1$ and $2$ in above corollary gives us full characterization of spaces which admit unique extremally disconnected compactification. Point $3$ tells us how to obtain such examples. As an example of a non-compact space admitting only extremally disconnected compactifications we can take $p\in \beta \mathbb{N}\setminus \mathbb{N}$ and consider $X = \beta \mathbb{N}\setminus \{p\}$. However if we take two distinct points $p, q\in\beta \mathbb{N}\setminus\mathbb{N}$ then $X = \beta\mathbb{N}\setminus \{p, q\}$ has two compactifications, $\beta \mathbb{N}$ and its one-point compactification, the latter not being extremally disconnected.