I am not a Constitutional scholar, but have learned from others here that anybody can be elected Speaker. You don’t have to be a Member of Congress. As to whether Ted could be both a Senator and Speaker at once, I don’t see anything that excludes it.
I doubt very much the courts would rule in favor of allowing a non-member speaker. It’s a really stupid idea anyway, really stupid.
A sitting Senator as Speaker is patently absurd.
It’s a moot question anyway, the House will never elect one.