What defines the main sequence?
Main sequence stars are characterized by hydrogen fusion in their cores, either through the proton-proton chain (for lower-mass stars) or the CNO cycle (for stars more than about 1.5 times the Sun's mass). Outside the core, no significant fusion takes place; the outer layers are involved in radiative or convective energy transport, but not energy generation. In general, if hydrogen fusion is occurring in the core, we say that a star is still on the main sequence.
This changes in stars that evolve off the main sequence. Some low-mass red giants may fuse hydrogen to helium via the CNO cycle in a layer outside a largely non-reactive helium core; this is referred to as shell burning. In more massive stars, heavier elements (e.g. helium, carbon, etc.) are fused inside the core, and shell burning continues in the outer layers. For instance, in a fairly high-mass star that is far into the post-main sequence phase of its life, you might see oxygen, neon, carbon, helium and hydrogen being fused in successive layers farther and farther from the core.
A common misconception is that a star uses up all its hydrogen before leaving the main sequence; this is not true. It merely uses up the majority of the hydrogen in its core; there is still plenty in the outer layers, which is what makes shell fusion possible.
Post-main sequence evolution
Let's consider stars of around one solar mass. As hydrogen fusion stops in the (now degenerate) core, the source of pressure keeping the star in hydrostatic equilibrium vanishes. Hydrogen burning starts in a shell around the core. After some time, the core begins to contract, the outer envelope expands, and the star is said to be on the red giant branch. Eventually, temperatures rise to the point where the triple-alpha process can occur, and a helium flash occurs, marking the beginning of the horizontal branch and helium fusion via the triple-alpha process. Hydrogen shell burning continues.
As you'll notice - and as others have said - stars don't fuse helium to beryllium to any significant degree during any part of this process, or post-main sequence evolution in general. It's endothermic; the triple-alpha process is exothermic.