Are convex preferences needed for the first welfare theorem? It would see so. For example, we could have a situation in which B's indifference curve is non-convex, such that, at the equilibrium X, it crosses A's indifference curve. Therefore, a movement to the left (if B's consumption is measured from the bottom left) will make A better off, and B no worse-off. Therefore, X is an equilibrium which is not pareto efficient.
Are convex preferences needed for the first welfare theorem?
No, convexity of preferences is imposed for other reasons. A general sufficient condition is local non-satiation, which says the agent can be made better off by an arbitrary small perturbation of his consumption bundle. This can hold without the preference being convex.
It would see so. For example...
As already pointed out by @Shomak, the example of an allocation you suggest is not an equilibrium. It also has nothing to do with convexity. Crossing of indifference curves at an allocation can occur for convex or non-convex preferences. Therefore it does not speak to the role of convexity in the theorem one way or another.
Assuming preferences are represented by differentiable utility functions (as per usual), standard marginalist reasoning tells you the allocation you describe is not an equilibrium.
Regardless of whether utility function is quasi-concave (i.e. whether the underlying preference is convex), the first order condition is always a necessary condition for optimality. Therefore agents must have the same marginal rate of substitution between commodities in equilibrium. When indifference curves cross, they don't have the same MRS.
Here is an answer that is probably confusing, but adds some advanced perspective.
The first general proof of the first welfare theorem (due to Kenneth Arrow) that did not rely on calculus used the assumption of strict convexity. Tjalling Koopmans later introduced the assumption of local-nonsatiation, which has become the standard assumption in textbooks for proving the first welfare theorem.
But the first welfare theorem holds under a weaker assumption that is at the same time implied by strict convexity: Local-nonsation can fail at most at one consumption bundle that is the best bundle for that consumer. A great source for all the details around how far one can generalize the welfare theorems is Pareto optima and equilibria: the finite dimensional case (paywall, sorry) by Andreu Mas-Colell.
The situation is often somewhat different when one works with infinite-dimensional commodity spaces (important for macro and finance). There, local non-satiation is often not a useful assumption for somewhat technical reasons and one uses strong monotonicity assumptions or nonsation plus strong convexity instead.