I think there's a confusion in some comments and maybe answers. It's important to distinguish between an ideal or non-ideal source, and, an independent or dependent source. An ideal source has no series impedance or shunt admittance, while a non-ideal source has. An independent current source provides the current given by its analytical expression regardless of the voltage across it, while a current-dependent current source provides a current proportional to another current.
Does it mean that an ideal transformer is an ideal current source?
An ideal transformer isn't an ideal independent current source. From one point of view, this doesn't make sense because a source has two terminals, while a single-phase two-winding transformer has four.
An ideal transformer is an ideal voltage-dependent voltage source in one side, and, an ideal current-dependent current source in the other side. This is shown in the following image, taken from Introduction to Electric Circuits (9th edition) by Richard Dorf and James Svoboda, where it's shown an ideal transformer with positive spatial orientation.

The derivation of the equivalent circuit on the right is straightforward. You start with the equations \$N_1/N_2 = v_1(t)/v_2(t)\$ and \$N_1/N_2 = -i_2(t)/i_1(t)\$ (which are valid for the chosen reference polarity of \$v_1(t)\$ and \$v_2(t)\$, the chosen reference direction for \$i_1(t)\$ and \$i_2(t)\$, and the fact that the transformer has a positive spatial orientation.) Solve for \$v_2(t)\$ and \$i_1(t)\$ to get:
\$v_2(t) = \dfrac{N_2}{N_1} v_1(t) \tag 1\$
\$i_1(t) = -\dfrac{N_2}{N_1} i_2(t) \tag 2\$
Notice the first equation has units of volts, while the second of amperes. In other words, to model them as an equivalent circuit, we can assume we can get them by applying KVL and KCL. Furthermore notice in the right-hand side of both equations the voltage \$v_1(t)\$ and current \$i_2(t)\$ have a coefficient different from 1, which means they can't be modeled as an ideal independent voltage source and an ideal independent current source. But we can model them as ideal dependent sources! Since the coefficient for both is \$N_2/N_1\$, we can use dependent sources with a gain equal to that. Taking into account the signs, finally you get the equivalent circuit above.
To prove the equivalent circuit is correct, apply KCL at the upper node of the primary side. You get
\$ \text{(currents entering)} = \text{(currents exiting)} \implies i_1(t) + \dfrac{N_2}{N_1} i_2(t) = 0 \implies i_1(t) = -\dfrac{N_2}{N_1} i_2(t) \tag*{}\$
which is the same as equation (2). Apply KVL at the loop of the secondary side in clockwise direction to get
\$ \text{(voltage rises)} = \text{(voltage drops)} \implies \dfrac{N_2}{N_1} v_1(t) = v_2(t) \tag*{}\$
which is the same as equation (1). Thus the equivalent circuit is valid.