The biggest difference between a preimage and the inverse function is that the preimage is a subset of the domain. The inverse (if it exists) is a function between two sets.
In that sense they are two very different animals. A set and a function are completely different objects.
So for example: The inverse of a function $f$ might be: The function $g:\mathbb R \to \mathbb R: g(x) = \sqrt[3]{x-9}$. Whereas the preimage of a set $B$ of the function might be $[1,3.5)\cup \{e, \pi^2\}$.
Now $g(x) = \sqrt[3]{x-9}$ and $[1,3.5)\cup \{7, \pi^2\}$ are completely different types of things.
This will be the case if $f$ is $f:\mathbb R \to \mathbb R: f(x) = x^3 + 9$ and $B= [10, 51.875) \cup \{352, \pi^6 + 9\}$.
The inverse $f^{-1}(x)$ (if it exist) is the function $g$ so that if $f(x) = y$ if and only if $g(y) = x$. So if $f(x) = x^3 + 9 = y$ then if such a function exists it must be that $g(y)^3 + 9 = y$ so $g(y)^3 = y-9$ and $g(y) = \sqrt[3]{y-9}$ so $g(x) = \sqrt[3]{x-9}$.
That's that.
The pre-image of $A= [10, 51.875) \cup \{352, \pi^6 + 9\}$ is the set $\{x\in \mathbb R| f(x) \in [10, 51.875) \cup \{352, \pi^6 + 9\}\}=$
$\{x\in \mathbb R| x^3 + 9 \in [10, 51.875) \cup \{352, \pi^6 + 9\}\}=$
$\{x\in \mathbb R| x^3 \in [1, 42.875) \cup \{343, \pi^6 \}\}=$
$\{x\in \mathbb R| x \in [1, 3.5) \cup \{7, \pi^2 \}\}=$
$[1, 3.5) \cup \{7, \pi^2 \}\}$.
And that's the other.
........
Now that's not to say the inverse of a function and the pre-image of a set under the function aren't related. They are. But they refer to different concepts. This is similar to how a rectangle and its area are related. But one is a geometric shape... the other is a positive real number. THey are two different types of animals.
....
I'll add more in an hour or so but I have to take the dog for a walk. I'll be back.
.....
It occurred to me as I was walking the dog that maybe what is confusing you is that the inverse function (if it exists) and the preimage of a set have very similar notation and the only way to tell them apart is in context.
If $f$ is invertible then the inverse function is written as $f^{-1}$ so if $f(x) = x^3 + 9$ then $f^{-1}(x) = \sqrt[3]{x-9}$.
But the preimage of $B$ under $f$ whether $f$ is invertible or or not is writen as $f^{-1}(B)$.
So if $f(x) = x^3 + 9$ then $f^{-1}(17) = 2$ means that if you enter $17$ into the function $\sqrt{x -9}$ you get $2$. But $f^{-1}(\{17\})=\{3\}$ and $f^{-1}(\{36,17\}) = \{2,3\}$ means that set of values that will output $\{17\}$ is the set $\{2\}$ and the set of values that will output $\{36,17\}$ is the set $\{2,3\}$.
A few things to note:
If $f$ is invertible then the preimage of a set is the same thing as the image of the set under the inverse function and that means the notation is compatible.
If $f(x) = x^3 + 9$ then $f^{-1}([1,36)) = [1,3)$ can be interpretated as both the the image of the set under the inverse function: $f^{-1}([1,36))= \{f^{-1}(x) = g(x) = \sqrt[3]{x-9}| x\in [1,36)\}$
OR it can be interpreted as the preimage for $f$: $f^{-1}([1,36)) = \{x\in \mathbb R| f(x) \in [1,36)\}$.
but this is not the case if $f$ is not invertible.
Say $f:\mathbb R \to [-1,1]; f(x)\to \sin x$. This is not invertible.
The pre-image of$B= \{\frac {\sqrt 2}2\}$ is $\{...-\frac {11\pi}4, -\frac {9\pi}4,-\frac{3\pi}4,-\frac \pi 4, \frac \pi 4, \frac {3\pi}4, \frac {9\pi}4, \frac {11\pi}4,....\}$ this is still written as $f^{-1}( \{\frac {\sqrt 2}2\})$ even though there is no function $f^{-1}:[-1,1]\to \mathbb R$.
Another thing to note is that not all the elements in $B$ have to have pre-image values.
If $f= x^2+9$ then $f^{-1}(\{8\}) = \emptyset$. This is because $\{x\in \mathbb R| f(x) = x^2 + 9 \in \{8\}\} = \emptyset$.
And some elements may have many preimages.
And $\sin^{-1}(\{\frac {\sqrt2} 2}$ showed.
Best Answer
It is mostly a notational sleight of hand, and a matter of definitions. Essentially, $g^{-1}$ is doing a lot of legwork here.
When given a specified value and when $g$ is invertible, $g^{-1}(y)$ for that single value $y$ gives you the $x$ such that $g(x) = y$.
Regardless of the invertibility, when we are dealing with a set $S$ (be it a singleton or otherwise), we define the symbol $g^{-1}(S)$ to be all elements of the domain which are sent into $S$ by $g$, i.e. $$g^{-1}(S) \stackrel{\text{def}}{=} \{ x \in \mathrm{domain}(g) \mid g(x) \in S \}$$ Notice how this does not depend on invertibility. (If it is invertible, then $S$ will be the same size as the output set, loosely speaking.)
Be sure to notice a distinction: the first takes in and puts out values; the second takes in and puts out sets. Even when the function is invertible, in fact. Taking $g(x) = x^3$ and $g : \mathbb{R} \to \mathbb{R}$ as an example,
$$g^{-1}(8) = 2 \text{ whereas } g^{-1}(\{8\}) = \{2\}$$
Another example of note would be $g : \mathbb{R} \to \mathbb{R}$ with $$ g(x) = \begin{cases} 1 & x = 0 \\ 0 & x \ne 0 \end{cases} $$ This function is not invertible (since, for instance, $g(2) = g(3) = 0$). Hence the notion of $g^{-1}(0)$ is undefined (as a single value). However, we can see that $$ g^{-1}(\{0\}) = \mathbb{R} \setminus \{0\} \qquad g^{-1}(\{1\}) = \{0\} $$ because every real number except $0$ is sent to $0$, and $0$ itself is sent to $1$.
Consequently, whether it is intended for you to interpret $g^{-1}$ as a set or a value ultimately depends on the context, namely:
Admittedly it is a bit of an overloaded notation and can cause some confusion, but I think interpreting the set case as a "generalization" of the value case makes that idea more evocative.