The short answer is of course. But it isn't necessarily going to be easy to get your foot in the door for a short time. You would almost be better off applying for jobs and then giving your notice before returning to teach.
There are two issues at play here.
The company the professor would intern at would not want to sink cost into temporary training.
The company would not want to expose private data. Especially to a mathematician that would usually mean working with customer data or insights, or company revenue etc. Companies usually don't want to expose themselves or their clients data to what would be a temporary hire that isn't getting vital work done.
Basically, a company tends not to want to hire or give space to someone who isn't going to produce some results or profit for them. If a mathematics professor genuinely expressed interest in helping the company in exchange for learning about the industry along the way (to benefit students as well) I do believe that it would just be a matter of communicating with enough companies.
Heck, it would probably benefit the professor to say that they will recommend future graduates to that company if they allow them to learn about the industry.