What is the difference between a ylide and a betaine?
The more definitive source for chemistry terminology is the IUPAC Gold Book.

Betaine


  Originally, the compound betaine, $\ce{(CH3)3N+–CH2C(=O)O−}$ (N,N,N-trimethylammonioacetate), and similar zwitterionic compounds derived from other amino acids. By extension, neutral molecules having charge-separated forms with an onium atom which bears no hydrogen atoms and that is not adjacent to the anionic atom. Betaines cannot be represented without formal charges.


Ylides


  Compounds in which an anionic site $\ce{Y−}$ (originally on carbon, but now including other atoms) is attached directly to a heteroatom $\ce{X+}$ (usually nitrogen, phosphorus or sulfur) carrying a formal positive charge. They are thus 1,2-dipolar species of the type $\ce{R_mX+–Y−R_n}$. 


So, ylides are not betaines and betaines are not ylides. Primarily due to the atoms in a ylide that contain the charges must be adjacent, and in betaines they must not be adjacent.

An example of a ylid would be the phosphonium ylid used in Wittig chemistry:



Since it has adjacent positive and negative charges, it is classified as a ylid.

The addition of this ylid to a carbonyl compound would form a betaine (note that the mechanism of the Wittig reaction is now thought to be a concerted [2+2] cycloaddition leading to the oxaphosphetane immediately, without the intermediacy of the betaine):



Note that the ylid has an alternate resonance form (the one with a P=C double bond) which has no formal charges, whereas the betaine cannot be drawn without formal charges.