Is it allowed for an iOS app to run volunteer computing projects?
Technically, it is possible. In fact, there’s a paper titled “Exploring mobile devices as Grid resources: Using an x86 virtual machine to run BOINC on an iPhone”. The paper was published in 2009, the abstract says:


  […] In this paper we propose the use of mobile devices themselves as grid computing nodes. We demonstrate the feasibility of this concept by implementing the BOINC client on an Apple iPhone. Work units are downloaded from a BOINC server and executed on the iPhone via a virtual machine emulating an x86 processor, and results are uploaded to the server. […]


Whether Apple would allow such an app on the iOS App Store though is another matter. BOINC has an Android app, but no iOS app, and their FAQ says:


  Can I run BOINC on my iPhone?
  
  There are currently some technical and legal barriers to doing volunteer computing on iPhones. It's possible that in the future these issues can be overcome.


A member of the BOINC project has mentioned one problem for them:


  As I understand the main problem of creating iOS BOINC app is that app can't download executable files […]


The App Store Review Guideline he is referring to is:


  2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including other apps. […]


As far as I know, there are no other volunteer computing project apps on the iOS App Store. I’m guessing another guideline that might be troublesome for such apps is:


  2.4.2 Design your app to use power efficiently. Apps should not rapidly drain battery, generate excessive heat, or put unnecessary strain on device resources.


Volunteering computing resources is of course likely to cause a rapidly draining battery and other strain. Whether or not this counts as “unnecessary” when the user is giving the app explicit permission to donate computing resources is something that would have to be argued with Apple.