I am not a financial adviser, so the following is more for information purposes and not advice. To answer your question regarding the down payment, I don't believe so. The IRS would likely take issue with you purchasing an investment property with your 529 plan. What they may not take issue with is your parents purchasing an investment property and charging you rent, with the rent coming from the 529 plan. This is a bit of a bummer for a couple reasons as it doesn't address your down payment and they are going to get taxed on the rent they collect.
Another thing to consider with this scenario is that it could be state and/or university specific. From my understanding, your rent cannot total more than university housing. If staying in a dorm runs $1,000/month, your parents couldn't charge more than $1,000/month for your rent. If you take on your friend as another tenant, it may help outweigh some of the potential cons that would come along with this process.
Hopefully an expert in this area will be able to provide a more concrete response, but I unfortunately don't believe it will work out as you have proposed.