First welfare theorem and convexity 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.