Yes, but not in a way that is likely to detect Ghosts if they exist
Mobile phones are, by definition, devices that can detect EMF (which is electro magnetic field see wikpedia) since their ability to communicate depends on radiofrequency fluctuations in EMFs. So apps on a smartphone can, at least in a trivial sense, detect EMF and alter it when they send a signal. Unfortunately, mobile phones are designed to detect only specific frequencies from about 800 to 2.2 GHz which are the frequencies of 2G and 3G cellular phone systems (see wikipedia again). It seems unlikely that software can turn them into devices that can detect general fluctuation in EMFs.
Some apps claim to use the magenetometers to detect EMF. And stand alone EMF detectors seem to be calibrated in units like milliGauss (see here for an example) which is a measure of magnetic field strength (wiki definition). This suggests that the sort of EMFs sought are low frequency changes in magnetic fields. So perhaps this is more likely to work as that is just what magnetometers can do. However, there are many many sources of interference that alter the background magnetic field of the earth (which is what magnetometers detect) as anyone who walks around a built up area while using the compass app on their phone will know. Large steel-framed buildings, cars, iron lamp-posts all cause major field changes that overwhelm the background field. As one useful site on sensors reports:
The magnetometer is commonly found on mobile devices such as smart phones and tablets, but it is one of the most difficult sensors to interpret. It is commonly called a compass since it measures the strength of the magnetic field in three dimensions, but does not necessarily point north. In fact magnetic interference can cause it to behave unpredictably, as often seen in augmented reality apps.
Even the believers don't seem to take the idea of detecting ghosts via phones seriously. This app claims it is is "just for fun". This discussion (I think fairly characterised as taking place on a believer site) dismisses the idea that phones can be reliable ghost detectors.
So, yes phones can detect EMF. But ghost detection apps are likely just reporting random background noise.