The expression $f(x) = \frac{x^2 - 1}{x + 1}$ is a formula (with two free variables, $f$ and $x$), not a function. It is not the same formula as $f(x) = x - 1$, but neither is $1 + 1 = 2$ the same formula as $2 = 1 + 1$.
By convention, such formulas are sometimes taken to represent functions in contexts where the domain and codomain can be inferred from context. In this case, one could say more precisely that $f: \mathbb{R} \setminus \{-1\} \to \mathbb{R}$ is the function defined for each $x \in \mathbb{R} \setminus \{-1\}$ by $f(x) = \frac{x^2 - 1}{x + 1}$. This is a continuous function. (The "missing point" in the domain, $-1$, is a (removable) singularity, not a discontinuity; it makes no sense to talk about continuity of a function outside its domain.)
If we instead tried to say that $f: \mathbb{R} \to \mathbb{R}$ is the function defined for each $x \in \mathbb{R}$ by $f(x) = \frac{x^2 - 1}{x + 1}$, we have spoken nonsense, because the expression $\frac{x^2 - 1}{x + 1}$ has no meaning if $x = -1$. However, we could instead take the domain to be literally any subset of $\mathbb{R} \setminus \{-1\}$, or even a subset excluding $-1$ of some other field (who said we're working in the real numbers?), provided we change the codomain to match.
Similarly, given any $D \subseteq \mathbb{R}$, one can say $g: D \to \mathbb{R}$ is the function defined for each $x \in D$ by $g(x) = x - 1$. Of course, this is a different function for each choice of $D$; from a structural standpoint, it doesn't even make sense to compare functions with different domains or codomains (and if one works in a framework where doing so does make sense, they're never equal anyway).
So, yes, if we choose $D = \mathbb{R}$, then $f$ and $g$ are not the same function. But they are related, in that $f$ is the restriction of $g$ to the domain of $f$; in other words, $g$ is an extension of $f$ (and, as it happens, a continuous extension).
On the other hand, if we choose $D = \mathbb{R} \setminus \{-1\}$, then $f$ and $g$ are literally the same function, because they have the same domain and codomain, and $x - 1$ and $\frac{x^2 - 1}{x + 1}$ are the same number for every $x$ in that domain.
Also, if we interpret $f$ and $g$ not as functions, but as "rational functions in one indeterminate $x$", i.e., elements of the field $\mathbb{R}(x)$, then $f = g$. Note, however, that "rational functions" in this sense are not functions, but equivalence classes of formal fractions of polynomials.