I will explain why the general answer to this question is negative in dimensions $\geq 4$. The next remark expresses the fundamental obstruction. We say a simplicial tree $T$ equipped with an action of a group $G$ (a so-called $G$-tree) dominates another $G$-tree $T’$ if there is a $G$-equivariant map $T\to T’$.
Remark: If $\phi\in H^1(M^n,\mathbb{Z})$ is Poincaré dual to an embedded submanifold $N^{n-1}\subseteq M^n$ then the corresponding action on the real line is dominated by the Bass—Serre tree of the splitting of $\pi_1(M)$ obtained by cutting $M$ along $N$.
This can be applied along with the following lemma; it must be well known but I don’t know a reference, so I will give a proof.
Lemma: If the kernel $K$ of $\phi:G\to\mathbb{Z}$ is finitely generated then the corresponding action on a line is not properly dominated by any other minimal action.
Proof: Let $T$ be a minimal $G$-tree that dominates $\phi$. We claim that $K$ fixes the whole of $T$.
First, we claim that $K$ fixes some point of $T$. If not then there is a minimal $K$-invariant subtree $T_K$. On the one hand, $K$ acts cofinitely on $T_K$ because $K$ is finitely generated. On the other hand, $K$ is $G$-invariant because $K$ is normal in $G$. By the $G$-minimality of $T$, it follows that $T=T_K$ and so $K$ acts cofinitely on $T$. Let $\Gamma_K=K\backslash T$ be the quotient graph of groups. Any $g\in G$ now acts as a covering transformation on $\Gamma_K$, so acts by graph automorphisms on the underlying graph. Since $\Gamma_K$ is finite, a large enough power $g^n$ fixes an edge, whence $g^n\in K$. But this is a contradiction when applied to any $g\in G$ with $\phi(g)=1$.
Therefore, $K$ fixes a vertex in $T$. Now, again because $K$ is normal in $G$, the fixed subtree $\mathrm{Fix}(K)$ is a $G$-invariant subtree, so $K$ must indeed fix the whole of $T$ by minimality, as claimed.
Thus, the kernel of the action of $G$ on $T$ is contained in $K$, so $T$ is the line given by $\phi$. QED
Combined with the remark, the lemma gives many examples. The simplest occurs in dimension 4, using the fact that $\mathrm{cd}_\mathbb{Q}(\pi_1(N^3))\leq 3$ for any closed 3-manifold
Example: Let $M^4$ be any closed oriented 4-manifold with $\pi_1(M)\cong\mathbb{Z}^5$. Then any $\phi\in H^1(M)$ has $\ker\phi\cong\mathbb{Z}^4$. Since $\mathbb{Z}^4$ is finitely generated, by the remark and the lemma it follows that if the dual of $\phi$ is represented by a closed manifold $N^3$ then $\pi_1(N)\cong\mathbb{Z}^4$, a contradiction.
In fact, the same argument works whenever $\pi_1(M^4)$ is a rational Poincaré duality group of dimension $\geq 5$.
For $\mathrm{dim}(M)\geq 5$, we can also construct counter examples, using @IanAgol’s observation in comments.
Example: Let $M^5$ haver $\pi_1(M)\cong F_2\times F_2$, with $F_2$ the free group of rank 2. Let $\phi:F_2\times F_2\to\mathbb{Z}$ send every generator to 1. Then $K=\ker\phi$ is finitely generated but not finitely presented. By the remark, if the dual of $\phi$ is represented by closed 4-manifold $N$ then $\pi_1(N)=K$. But $K$ is not finitely presented, so this is a contradiction.
More generally, @MoisheKohan’s answer appears to prove that this necessary condition is also sufficient. This is a very nice and natural group-theoretic question, that I haven’t seen addressed before:
Question: Let $G$ be a finitely presented group. Which $\phi:G\to\mathbb{Z}$ are dominated by a splitting over a finitely presented subgroup?