Yes, though there is a procedure for in that doesn’t involve running back and forth (don’t do this as the bailiff will tackle you).
The defendant will almost always need to take the stand. There are two ways this can be done. Which is permitted depends on the judge.
The first, more common method is that the defendant gives a statement without being questioned. This would include all relevant facts that would normally be given by answers to their lawyer’s questions.
After this statement is given, the prosecution will cross-examine as usual.
The second is more similar to what you describe- the defendant plays the role of asker and answerer. The defendant does not run back and forth and should probably refrain from doing a silly voice for the lawyer part but yes, they ask questions and answer them. This was used in United States v. Nivica, 887 F.2d 1110 (1st Cir. 1989).