Sure you can.
You will be using the IPad as a streamer, DAC , and kind of preamp in your scenario.
Honestly in most cases I did this, the sound was better than I thought it would be… but not competitive with other inputs. Using an external DAC will be much better.
Amazon has dozens of connectors for either analog output or digital (many connector types) or both.
Given the cost to do it. I would just do it and see what you think. A high quality DAC will help a lot as a bridge until you can afford a high quality streamer… if that is the way you plan on going.