Can a graduate student with deficiencies get an assistantship for the needed undergraduate courses?
One important general comment: It seems like you feel as though the department will leave you on your own to take these "needed undergraduate courses". I find this highly unlikely! If a department admits you (and funds you), then they are on your side and want you to succeed! If you are lacking some "satisfactory undergraduate training", then the admissions committee will know this before offering you a spot in their program. When they make you an offer, they know what you specifically will need to do to meet the requirements of their program, and it's in the best interest of the department to help you work towards meeting these requirements.

If you enroll in a graduate program, you will be expected to get your knowledge of the basic areas of the subject up to the standard set by the department. Moreover, you will be expected to do this according to their timeline. Sometimes this may require you to take some undergraduate courses, which is not a big deal.

In my experience in mathematics graduate school, students given the "standard" teaching assistantship are free to take courses of virtually any kind (with perhaps the approval of the math department), and the tuition for these courses is covered by the assistantship automatically. There is no extra assistantship needed for such courses. In my department, I've never heard of a student being denied permission to take courses outside of the department, and I've seen math grad students take undergraduate courses like dance and Japanese. So presumably if you were a "fully funded" grad student and you needed to take some undergrad courses while in grad school, these would be covered by your existing assistantship.

As to your last question: For the "standard" teaching assistantship, in math, it is typical that the student maintains (or rather, annually renews) the assistantship until she is done with the degree. This is of course dependent on the student making satisfactory progress towards the degree, as defined by each individual department.