Question: do you need wifi to connect your phone to a smart tv?
Answer: Yes. Screen casting or screen mirroring does not require an internet connection. If your smart TV supports screen mirroring then you can cast a device like smart phone or windows notebook which also should support casting. Both devices will be connected using built in wi-fi and doesn't need internet.