Yes, this is true. Suppose $Y$ is not regular; let $a\in Y$ be a point with a neighborhood $U$ which contains no closed neighborhood of $a$. For each neighborhood $V$ of $a$, its closure is not contained in $U$, so we can pick a filter $F_V$ which contains $V$ and converges to a point $y_V\not\in U$.
Now let $S$ be the set of neighborhoods of $a$, $X$ consist of elements of $Y$, and let $T=X\sqcup S\sqcup\{\infty\}$ equipped with the following topology. A set $A\subseteq T$ is open iff it satisfies the following conditions:
- For each $V\in S$ which is in $A$, $A\cap X\in F_V$.
- If $\infty\in A$ then there exists some $V\in S$ such that $W\in A$ for all neighborhoods $W\subseteq V$ of $a$.
Intuitively, we are starting with $Y$ with the discrete topology, then adjoining a point $V$ for each $V\in S$ which is a limit of the filter $F_V$ on $Y$, and then adjoining a point $\infty$ which is a limit of the net formed by these points $V$ with respect to the reverse inclusion order of neighborhoods.
Note that $X$ is dense in $T$ (its closure contains all of $S$ by (1) and thus contains $\infty$ by (2)). Define $f:T\to Y$ by $f(y)=y$ for $y\in X$, $f(V)=y_V$ for $V\in S$, and $f(\infty)=a$. Note that $f$ is continuous when restricted to $X\sqcup S$: if $W\subseteq Y$ is open and $f(V)=y_V\in W$, then $W\in F_V$ since $F_V$ converges to $y_V$ so $f^{-1}(W)$ satisfies condition (1). However, $f$ is not continuous on all of $T$ since $f^{-1}(U)$ is not open (it contains $\infty$ but does not contain any elements of $S$).
Finally, I claim that $f$ preserves convergence of nets in the dense subset $X\subset T$. Since $f$ is continuous on $X\sqcup S$, it suffices to check this for nets that converge to $\infty$. So suppose $(y_i)$ is a net in $X$ that converges to $\infty$ in $T$; we wish to show that $(y_i)$ converges to $f(\infty)=a$ in the topology of $Y$. Note that if $V\in S$, then $V\sqcup \{W\in S:W\subseteq V\}\sqcup\{\infty\}$ is open in $T$. So, $(y_i)$ is eventually in this open set, which means $(y_i)$ is eventually in $V$. That is, $(y_i)$ is eventually in every open neighborhood of $a$, so it converges to $a$.
(If you restrict to Hausdorff spaces, then there is a rather more elegant construction: you can instead take $T$ to be the set of all convergent ultrafilters on $Y$ (with the usual topology on the set of ultrafilters on a set) and $f:T\to Y$ the map taking a convergent ultrafilter to its limit. Then $f$ is continuous iff $Y$ is regular by an argument similar to the one above; see here. But the principal ultrafilters are dense in $T$ and $f$ always preserves convergence of nets of principal ultrafilters, again by an argument similar to one above.)