Is it dangerous to assume that pullback of a superset of the image is properly defined?
More precisely, say $f:A\to C$ and $f(A)=B\subset C$ where $C-B\neq\emptyset$. Is it okay to assume that $f^{-1}(C)$ is defined even though $\exists x\in(C-B)$ such that $f(x)$ is not defined?
Can I just say that $f^{-1}(C)=A$ or do I have to say $f^{-1}(C)\subset A$?
Concerning the range of $Y$ for which $f^{-1}(Y)$ is defined, that's up to you, or your textbook, or your instructor. If you define $f^{-1}(Y)$ as the set of elements $a$ of $A$ such that $f(a) \in Y$, then the definition makes sense for any set $Y$, even if $Y$ and the codomain of $f$ are disjoint (then you just get $f^{-1}(Y) = \emptyset$). It's more usual though to define $f^{-1}(Y)$ just for subsets $Y$ of the range of $f$, or of the codomain of $f$.
Whether "codomain of $f$" is meaningful depends on how you define functions. Evidently you're working with a definition in which it is meaningful; in such contexts, it's usual to define $f^{-1}(Y)$ for all subsets $Y$ of the codomain.
As to whether $f^{−1}(C) = A$, clearly, yes, provided only that you allow that $f^{-1}(C)$ is well defined.