Algebras that are free modules over a subalgebra

This has been annoying me for the past two days.

Suppose we have an algebra $A$ over some field and a subalgebra $B \subseteq A$. Suppose we also have that $A$ is a finitely-generated free module over $B$, so as a $B$-module $A =Bx_1 \oplus ... \oplus Bx_n$ for some $x_1,...,x_n \in A$.

Can I assume $x_1=1$?

Or is it possible there is some sort of example where although $A$ is just $n$ copies of $B$ as a module, the only way it contains $B$ as a subalgebra is a different one where the structure is more complicated and it doesn't decompose into that direct sum?

-

I guess the following works: (I have the roles of $A$ and of $B$ reversed...)
If $A$ is either local notherian or non-negatively graded and connected, and if the map $A\to B$ is injective (it has to be, I think...) then $B/A$ is free as an $A$-module. It follows that the s.e.s. $0\to A\to B\to B/A\to0$ splits and that $A$ is a summand in $B$: that means you can suppose $x_1=1_B$.
To prove that $B/A$ is free, it is enough to see that $\mathrm{Tor}_1^A(K,B/A)=0$ for $K$ the residue field in the first hypothesis, and the base field in the second one. Looking at the long exact sequence for $\mathrm{Tor}_1^A(K,\mathord-)$ strongly enough does it.
Dear Mariano, this also follows from the following criterion (Prop. 1.22 of people.fas.harvard.edu/~amathew/chthreeimportantfunctors.pdf): a map of free modules is a split injection if and only if the map obtained by tensoring with the residue field is an injection. However, $A \otimes K \to B \otimes K$ is an injection since it is a map of rings and $A \otimes K$ is a field. (And now this remark is Ex 3.11 in the file!) – Akhil Mathew Feb 6 '11 at 2:10
@Akhil, I think that's essentially the same thing (that proposition can also be proved as follows: if the reduction $\bar\phi$ is an injection, then $\phi$ is an injection and $\mathrm{Tor}_1(k,F'/\phi(F))=0$ so $F'/\phi(F)$ is free.) – Mariano Suárez-Alvarez Feb 6 '11 at 2:21