Your question is really about the uniformization problem, a major focus of descriptive set theory. A set $B\subset X\times Y$ is uniformized by a set $C\subset B$ if $C$ is the graph of a function with the same projection as $B$. In other words, the function selects one member of each nonempty section of $B$, and this function is a one-sided inverse of the projection function $\pi_X$ from from $B$ to $\pi_X(B)$.
There are a variety of uniformization theorems in descriptive set theory, which you can read about in the usual descriptive set-theoretic texts. For example, the Lusin-Novikoff result is that if $B$ is Borel and all sections are countable, then it has a Borel uniformationif (as$B$ is Borel and all sections are countable, then it has a Borel uniformation, as mentioned by Burak in the comments) (see Exercise 4F.6 in Moschovakis's book. Alternatively, when the sections are large in various senses, then again there is a Borel uniformization (see when the sections areBorel classes of uniformizations of sets with large in various senses, then again there is a Borel uniformizationsections (see alsoby Petr Holicky and thisthese further exercises in Moschovakis's book).
Meanwhile, the full Borel uniformazation property is not true (and indeed perhaps this is why the descriptive set theorists make so much effort to discover the circumstances when sets can be uniformized and to find out how simple the uniformizing sets can be found). Namely, there is a Borel set $B\subset\mathbb{R}\times\mathbb{R}$ projecting to the whole of $\mathbb{R}$, but having no Borel uniformization. (You can find a discussion of the proof that such a $B$ exists in Example 5.1.7 of this text by Srivastava.) In particular, the projection map $\pi:B\to \mathbb{R}$ is a Borel surjection having no Borel inverse in your sense.