They both landed successfully and ingenuity was deployed. Perseverance drove away, and then Ingenuity failed. Could Perseverance survive on its own?
Yes, the Perseverance rover could survive without the addition of the Ingenuity helicopter. The primary purpose of the mission was Perseverance, with Ingenuity as a technology demonstrator (a minor side test). As NASA intentionally made it, were the Ingenuity helicopter to fail, Perseverance would have been just fine. Frankly, the 2 are (mostly) independent vehicles. The only exception to that fact is that the Ingenuity helicopter relies on the Perseverance rover for its communications to and from Earth based ground control stations. Perseverance, however, wouldn't notice any difference at all, other than having less communication traffic back and forth from mission control and not having Ingenuity as a scout anymore.
Well, since NASA thought that Ingenuity had a pretty large chance of experiencing a failure, they wanted to keep the more important, billion dollar Perseverance rover safe, which makes sense. As mentioned before, Ingenuity was just a technology demonstrator, and was treated as such. Ingenuity's success was not at all mission critical, while Perseverance was the entire purpose of the mission (and therefore, obviously, mission critical). The primary mission was Perseverance, so the billion dollar primary rover was made to not be reliable on a small secondary test.
There is absolutely nothing in Ingenuity that is critical for Perseverance. Ingenuity was at several points in time almost scrapped. There are no transmitters or otherwise that are required for Perseverance. Curiosity, Spirit, and Opportunity have all successfully navigated without a helicopter for imaging.
Ingenuity specifically was a "Technology Demonstrator". It was originally planned for 3-5 missions, and was going to be no longer used, even if it still worked. The mission was successful enough they decided to keep going. It has only been VERY recently that Ingenuity has been used for a mission that Perseverance absolutely could not do, that of capturing the debris. It has also helped scout the path for Perseverance. The path can be found without Ingenuity, and the landing debris picture wasn't required.
Bottom line, while Ingenuity is doing some science that Perseverance can't, and helping it find a clear path, Perseverance will be perfectly fine when Ingenuity no longer functions.
Of some note, the reverse isn't true. Ingenuity has no way to communicate with Earth without Perseverance, and thus if Perseverance stops working, Ingenuity also will. It also has to remain close to Perseverance to work, so if Ingenuity can't fly then it will die when Perseverance moves on with no way to contact Earth.