Let us say that a finitary algebraic theory $\tau$ has IBN (invariant basis number) if the free functor $F : \mathsf{Set} \to \mathsf{Mod}(\tau)$ reflects the isomorphism relation: If $S,T$ are sets with $F(S) \cong F(T)$, then $S \cong T$. When $\tau$ is the theory of $R$-modules for some ring $R$, then this is the usual IBN property of $R$ (at least when we restrict to finite sets).
If $\tau \to \sigma$ is a homomorphism and $\sigma$ satisfies IBN, then also $\tau$ satisfies IBN. Besides the classical example of vector spaces, this gives lots of examples for IBN theories (abelian groups, modules over commutative rings $\neq 0$, groups and Lie algebras (using abelianization), monoids, semigroups, quasigroups, loops, magmas, commutative variants of them, etc.). One can show IBN for (commutative) $R$-algebras, where $R \neq 0$ is a commutative ring. Benjamin Steinberg has remarked in the comments that $\tau$ has IBN when there is a $\tau$-module with finite cardinality $>1$. This gives lots of further examples.
A directed colimit of IBN theories $\tau = \mathrm{colim}_i \tau_i$ is IBN for finite sets and therefore IBN by E: If $F_\tau(S) \to F_\tau(T)$ is a homomorphism, it is given by a map $S \to F(T)$, which factors through some $S \to F_{\tau_i}(T)$. Similarily the other way round. That $F_\tau(S) \to F_\tau(T) \to F_\tau(S)$ is the identity, already holds for the factorizations if $i$ is big enough. Therefore it suffices to consider finitely presented theories.
Now I have several questions:
A. Has the IBN property for algebraic theories in general been studied in the literature?
B. What are further interesting examples of IBN or $\neg$ IBN (beyond module categories)?
C. What about the infinitary theory of compact Hausdorff spaces? If $X,Y$ are sets such that their Stone-Čech compactifications $\beta(X),\beta(Y)$ are homeomorphic, does it follow $X \cong Y$? (answered by Benjamin Steinberg: Yes)
D. Do nontrivial commutative algebraic theories satisfy IBN? In other words, is the rank of a free module over a nontrivial generalized ring à la Durov well-defined? This should be crucial for the theory of generalized schemes, right?
E. Is there some algebraic theory which satisfies IBN for finite sets, but not IBN for arbitrary sets? (answered by Joseph Van Name: No).
F. When $|S| \leq \kappa$$|S| < \kappa$, then $F(S)$ is $\kappa$-presentable. Is there some $\tau$ which satisfies IBN, but $F(S)$ is $\kappa$-presentable for some $\kappa < |S|$?