Firstly, if the requirement in (1) is not that $A_k\notin\mathcal U$ then it is simply not true if $\mathcal U$ is free.
Proof: Suppose $\mathcal U$ is free, then there is some $A\in\mathcal U$ which is infinite and not co-finite. Take partition of $\mathbb N\setminus A$ to infinitely many infinite sets, $A_n$ for $n>0$, set $A_0=A$.
This is a partition to infinite sets, however if such $X\in\mathcal U$ exists then $X\cap A\in\mathcal U$ is a singleton, contradiction the fact the ultrafilter is free.
Now, for your actual question, suppose $f\colon\mathbb N\to\mathbb N$ and $A_k=f^{-1}(k)$, since $f$ is indeed not $\mathcal U$-constant we know that $A_k\notin\mathcal U$ for all $k$.
By property (1) there exists some $X\in\mathcal U$ such that $X\cap A_k = \{x_k\}$ for all $k\in\mathbb N$, therefore $X=X\cap\mathbb N = X\cap\bigcup_k A_k = \bigcup_k X\cap A_k = \bigcup_k\{x_k\}$.
Define $g\colon\mathbb N\to\mathbb N$ as follows:
$g(x) = k$ for $x=x_k\in X$ and $g(x)=0$ otherwise.
As Martin enlightened me in the comments, it seems $g$ is not injective, and easy to see it is surjective and therefore cannot be made injective like that. Instead we will change slightly the playing sets:
Since $\mathcal U$ is an ultrafilter either $2\mathbb N$ or $2\mathbb N+1$ are in it (i.e. even numbers and odd numbers). Without the loss of generality assume the even numbers are there, and let X'=X\cap\{2k\mid k\in\mathbb N\}.
Since X' is not co-finite. Enumerate the following sets:
- \mathbb N\setminus X' = \{y_k\mid k\in\mathbb N\},
- \{k\mid x_k\notin X'\}=\{y'_k\mid k\in\mathbb N\}.
Now we can define $g$ as follows:
- $g(x) = k$ if x=x_k\in X' for some $k$;
- g(x) = y'_k if x=y_k\notin X' for some $k$.
This can probably be cleaned up a little bit, but for the needs of the proof it works.
If $g(a)=g(b)$ then clearly either a,b\in X' or a,b\notin X' (otherwise the range of $g$ goes into disjoint sets), and the definition of each part is obviously injective.
Now suppose $\{n\mid f(n)=g(n)\}\notin\mathcal U$, then we have $Y=\{n\mid f(n)\neq g(n)\}\in\mathcal U$.
Since ultrafilters are closed under finite intersections we have some k\in X'\cap Y however $f(x_k)=k=g(x_k)$ which is a contradiction. Therefore $Y\notin\mathcal U$ and X' is, and so $f$ is $\mathcal U$-equivalent to an injective function.