Let $A$ be a ring with some multiplicative subset $S$. Define $AS^{-1} = \{\frac as| a \in A, s \in S\}$.
Let $I_A$ and $I_S$ be the sets of ideals of $A \subset A-S$ and $AS^{-1}$ respectively. Define maps $f(I_A \mapsto I_S):\mathfrak a \mapsto \mathfrak aS^{-1}$ and $\ \ g(I_S \mapsto I_A):\Omega \mapsto \Omega \cap A$.
It is clear that $f\circ g = \operatorname{id}_{AS^{-1}}$. Is $g\circ f = \operatorname id_A $ too?
$b \in A \cap \mathfrak aS^{-1}-\mathfrak a \iff \exists s\in S, b\notin \mathfrak a: bs \in \mathfrak a$. If $\mathfrak a$ were prime, then we would be done but in general there can be counterexamples correct?
I do not actually know many examples of localization of rings so if there is one that is a rich source of counterexamples in some ring(or collection of rings), I would be very interested in that too.
Edit: An answer was suggest by @hoot in the comments, I have posted that as an answer. I am now interested in the case where $S = A-\mathfrak p$ for some prime ideal $\mathfrak p$ of $A$.
It's not restrictive to assume that $1\in S$, as there is a canonical isomorphism between $S^{-1}A$ and $S_1^{-1}A$, where $S_1=S\cup\{1\}$, so I'll henceforth assume $1\in S$.
The ring homomorphism $\lambda_S\colon A\to S^{-1}A$ might be non injective, so the maps are, more precisely, $$ f\colon I_A\to I_S, \quad f(\mathfrak{a})=\lambda_S(\mathfrak{a})S^{-1}A=\mathfrak{a}^e $$ and $$ g\colon I_S\to I_A, \quad g(\mathfrak{b})=\lambda_S^{-1}(\mathfrak{b})=\mathfrak{b}^c $$ It is easy to prove that $\mathfrak{b}^{ce}=\mathfrak{b}$ for all ideals $\mathfrak{b}$ of $S^{-1}A$. Just notice that $\mathfrak{b}^c=\{a\in A: a/1\in\mathfrak{b}\}$.
In particular $f$ is surjective and $g$ is injective.
Of course, the two maps need not be bijective and actually they never are, except in the case when $S=\{1\}$. Indeed, if $s\in S$ and $s\ne1$, we have $(sA)^e=S^{-1}A$, because $s/1\in(aA)^e$ and is invertible in $S^{-1}A$. More generally, if $\mathfrak{a}\cap S\ne\emptyset$, $\mathfrak{a}^e=S^{-1}A$, for the same reason.
If $\mathfrak{b}$ is a proper ideal of $S^{-1}A$, then $\mathfrak{b}^c\cap S=\emptyset$. Indeed, if $a\in\mathfrak{b}^c\cap S$, we have $a/1\in\mathfrak{b}$ is invertible in $S^{-1}A$.
We could try proving that $\mathfrak{a}^{ec}=\mathfrak{a}$ when $\mathfrak{a}\cap S=\emptyset$, but this is not true, in general. Of course $\mathfrak{a}\subseteq\mathfrak{a}^{ec}$. Let's see what the elements of $\mathfrak{a}^{ec}$ look like.
If $a\in\mathfrak{a}^{ec}$, then $a/1\in\mathfrak{a}^e$, so $$ \frac{a}{1}=\sum_{i=1}^n\frac{x_i}{1}\frac{y_i}{s_i} $$ for $x_i\in\mathfrak{a}$, $y_i\in A$ and $s_i\in S$; a standard argument shows then that $$ \frac{a}{1}=\frac{x}{s} $$ for some $x\in\mathfrak{a}$ and $s\in S$, so there is $t\in S$ with $$ (as-x)t=0 $$ In particular, there is $u\in S$ such that $au\in S$. Conversely, if $a\in A$ and $as\in\mathfrak{a}$ for some $s\in S$, we have $$ \frac{a}{1}=\frac{as}{s}\in\mathfrak{a}^e $$ and therefore $a\in\mathfrak{a}^{ec}$. So we conclude that $$ \mathfrak{a}^{ec}=(\mathfrak{a}:S)=\{a\in A:as\in\mathfrak{a} \text{, for some }s\in S\} $$ Thus $\mathfrak{a}^{ec}=\mathfrak{a}$ if and only if $(\mathfrak{a}:S)=\mathfrak{a}$.
A special case is when $S=A\setminus\mathfrak{p}$, where $\mathfrak{p}$ is a prime ideal of $A$. In this case, $\mathfrak{a}\subseteq\mathfrak{p}$ is an equivalent condition for $(\mathfrak{a}:S)=\mathfrak{a}$, when also $\mathfrak{a}$ is prime.
Indeed, suppose $\mathfrak{a}\subseteq\mathfrak{p}$ and $a\in(\mathfrak{a}:S)$. Then $as\in \mathfrak{a}$ for some $s\notin\mathfrak{p}$, in particular, $s\notin\mathfrak{a}$; since $\mathfrak{a}$ is prime, we conclude $a\in\mathfrak{a}$.
It's easy to show now that the maps between the set of ideals induce a bijection between the prime ideals of $A$ contained in $\mathfrak{p}$ and the prime ideals of $(A\setminus\mathfrak{p})^{-1}A=A_{\mathfrak{p}}$.
Let's look at an explicit example. Let $A=\mathbb{Z}$ and $\mathfrak{p}=p\mathbb{Z}$, where $p$ is a prime number. The ideals contained in $p\mathbb{Z}$ are of the form $m\mathbb{Z}$, where $p\mid m$. Let's use $p=3$ and $m=6$. Then, setting $S=\mathbb{Z}\setminus3\mathbb{Z}$, we have $$ (6\mathbb{Z}:S)=3\mathbb{Z} $$ so $(6\mathbb{Z})^{ec}\ne6\mathbb{Z}$.
Try proving that $(m\mathbb{Z})^{ec}=m\mathbb{Z}$ if and only if $m$ is a power of $p$.