Denote $I=(0, 1)$, and let $\mu$ be the Lebesgue measure on $I$. Does there exist a function $f$ on $I\times I$ viewed as an element of the space $L^\infty(\mu\times\mu)$ such that $$ f^2=f $$ (that is, $f$ takes values 0 and 1); $$ f(x, y)+f(y, x)=1 $$ (that is, if $f(x, y)=0$ then $f(y, x)=1$, and vice versa); and $f$ admits a representation $$ f(x, y)=\int_I g_t(x)\cdot h_t(y)\,dt $$ (which in particular contains representations as sums $\sum_k g_k(x)\cdot h_k(y)$) with $$ \int_I \|g_t\|_\infty\cdot \|h_t\|_\infty\,dt<\infty, $$ where $\|\cdot\|_\infty$ stands for the norm in the space $L^\infty(\mu)$?
Remark (update): If we replace the $L^\infty$-norms by the $L^2$-norms in the last formula, we obtain the condition for the integral operator on $L^2(\mu)$ with kernel $f$ to belong to the trace class. Observe that this operator belongs to the Hilbert-Schmidt class for any kernel $f$ satisfying the above properties because $f$ is square-summable.
Update No.2. The integral operator whose kernel is the indicator of the triangle $\{x<y\}$ is not of trace class. (Proof: If it is of trace class, then so is the integral operator whose kernel is the indicator of the rhombus, but this is not true.) Therefore, the set $\{f=1\}$ must be very complicated near the diagonal: no subset of $I$ can give us a 'triangular' structure of $f$ even after an arbitrary rearrangement.