Absolutely! That's exactly why I bought mine a couple of years ago. I already have a phone, so didn't need another one. At the time, the LG V30 was one of the most viable DAPs you could get at a bargain price. You happened to get a free phone with it too. I've got my local music library on it, Qobuz, TIDAL and Roon. I have Discord, WhatsApp, other social media on it and variety of other apps too.
The sound quality is is still very good given its price.
However, the big downside is that it's a very old phone now in tech terms. Mine is still on Android version 8.0.0 and have had no security patches since 2019. It's a sealed battery although you may be able to get it replaced by a mobile phone repair shop - I bought a spare battery for it a few months ago and will get it fitted soon. I have a noticeable decline in battery life at the moment. Just be aware of the battery decline if you buy a used one.