Let $X$ be a smooth projective variety over an algebraically closed field $K$ of dimension greater than $1$. Suppose there exists a flat projective morphism $f:X \to \mathbb{P}^n$ for some $n \ge 1$. Suppose there exists a divisor in $X$ which is flat over $\mathbb{P}^n$. Under what condition on $f$ or $X$, does this imply that there exist a rational section to $f$?

This is a followup to Mike Roth's important, correct comment (now disappeared). The following is one of a series of examples that I learned of from Tom Graber, but which I guess goes back to the work on "normic forms". Assume that the characteristic is not $3$ (there are similar examples in every characteristic). Let $\mathbb{P}^1$ have homogeneous coordinates $[U,V]$. Let $\mathbb{P}^3$ have homogeneous coordinates $[T_0,T_1,T_2]$. Consider the closed subscheme $Y$ of $\mathbb{P}^1\times \mathbb{P}^2$ with bihomogeneous defining equation $$ F(U,V;T_0,T_1,T_2) = U^2T_0^3 + UVT_1^3 + V^2T_2^3.$$ There is an action of $\mathbb{G}_m$ on $\mathbb{P}^1\times \mathbb{P}^2$ where $\lambda\in \mathbb{G}_m$ acts by $$ \lambda \bullet ([U,V],[T_0,T_1,T_2]) = ([U,\lambda^{3}V],[T_0,\lambda T_1,\lambda^2 T_2]).$$ The homogeneous polynomial $F$ is invariant for this (bilinearized) action. Thus $Y$ is invariant. Of course $Y$ is singular at the points $([1,0],[0,0,1])$ and $([0,1],[1,0,0])$, but that changes nothing. There exists a resolution $\nu:X\to Y$ that is projective (just a sequence of blowings up). Since $X$ is a smooth, projective variety of dimension $2$, since $\mathbb{P}^1$ is a smooth, projective variety of dimension $1$, and since the morphism $f := \text{pr}_{\mathbb{P}^1}\circ \nu$ is surjective, automatically $f:X\to \mathbb{P}^1$ is flat and projective. If there were a rational section of $f$, then its image in $Y$ would be a rational section of $\text{pr}_{\mathbb{P}^1}:Y\to \mathbb{P}^1$. The Zariski closure of this rational section would be a curve, which then gives a point of the Hilbert scheme parameterizing curves on $Y$. The action of $\mathbb{G}_m$ on $Y$ induces an action of $\mathbb{G}_m$ on the Hilbert scheme. Consider the orbit under $\mathbb{G}_m$ of the specified point of the Hilbert scheme. Since the (connected components of the) Hilbert scheme are projective, the closure of this orbit is proper. In particular, there exists a "limit at infinity" of the original Hilbert point. This "limit point" parameterizes a curve $C$ in $Y$ that is a limit of rational sections, and that is $\mathbb{G}_m$invariant. By the valuative criterion of properness applied to $f$, every limit of a oneparameter family of rational sections of $f$ is, again, a rational section of $f$, i.e., there is a unique component of $C$ that dominates $\mathbb{P}^1$, and this component is the image of a rational section of $f$. Since $C$ is $\mathbb{G}_m$invariant, also the rational section is $\mathbb{G}_m$equivariant. However, the only $\mathbb{G}_m$equivariant rational sections of the projection, $$\text{pr}_{\mathbb{P}^1}:\mathbb{P}^1\times \mathbb{P}^2\to \mathbb{P}^1,$$ are "monomial" sections, i.e., $$ h([U,V]) = ([U,V],[c_0U^{a_0}V^{b_0},c_1U^{a_1}V^{b_1}, c_2U^{a_2}V^{b_2}]), $$ where $c_0$, $c_1$, $c_2$ are elements in the ground field such that $(c_0,c_1,c_2)\neq (0,0,0)$, and where each $a_i$ and $b_i$ is a positive integer such that $a_0+b_0=a_1+b_1=a_2+b_2 = e$ for some positive integer $e$. But then the restriction of the equation $F$ on this section is, $$ F\circ h([U,V]) = c_0^3U^{3a_0+2}V^{3b_0} + c_1^3U^{3a_1+1}V^{3b_1+1} + c_2^3U^{3a_2}V^{3b_2+2}. $$ In particular, the congruence classes modulo $3$ of the exponent vectors of the $3$ terms are $(\overline{2},\overline{0})$, $(\overline{1},\overline{1})$, and $(\overline{0},\overline{2})$. So there can be no cancellation, i.e., the monomials are linearly independent in $k[U,V]$. So the only way that this linear combination of monomials may be zero is if $(c_0^3,c_1^3,c_2^3)$ equals $(0,0,0)$, contradicting that $(c_0,c_1,c_2)\neq (0,0,0)$. This contradiction proves that there is no rational section of $f$. By the way, this works more generally to show that for every triple of positive integers $(r,d,n)$ with $n+1=d^r$, there exists a degree $d$ hypersurface $Y$ in $\mathbb{P}^r\times \mathbb{P}^n$ such that the projection $Y\to \mathbb{P}^r$ admits no rational section. These are "normic forms" showing that the TsenLang theorem is sharp. Edit. My equivariance argument above is off, although the conclusion is correct. By the valuative criterion of properness, every equivariant rational section of $\text{pr}_{\mathbb{P}^1}$ extends to an equivariant regular section. By the classification of invertible sheaves on $\mathbb{P}^1$ and the universal property of $\mathbb{P}^2$, every regular section $h$ is of the form, $$ h([U,V]) = ([U,V],[h_0(U,V),h_1(U,V),h_2(U,V)]), $$ where $h_0$, $h_1$ and $h_2$ are homogeneous polynomials in $k[U,V]$ of some common degree $e$. Finally, the equivariance gives that, for some integer $w$ (the "weight"), we have $$ h_0(U,\lambda^3 V) = \lambda^w h_0(U,V), \ h_1(U,\lambda^3 V) = \lambda^{w+1} h_1(U,V),$$ $$ h_2(U,\lambda^3 V) = \lambda^{w+2} h_2(U,V). $$ Now, for $i=0$, $1$ or $2$, if $(a_i,b_i)$ is the exponent vector from a nonzero term in $h_i$, then the equations above give that $$w+i=3b_i.$$ In particular, modulo $3$, $w$ is congruent to $i$. Thus, if at least two of $h_0$, $h_1$, and $h_2$ is not the zero polynomial, we get a contradiction: $w$ is simultaneously congruent modulo $3$ to two of $0$, $1$ and $2$. However, if only one of the $h_i$ is nonzero, then $F\circ h$ equals $U^{2i}V^ih_i(U,V)^3$, which is a nonzero polynomial in $k[U,V]$. Since $F\circ h$ is nonzero, this contradicts that $h$ factors through $Y$. So the conclusion is the same: there are no $\mathbb{G}_m$equivariant rational sections of $f$, hence there are no rational sections at all. 

