Is my employer discriminating against non-parents?
Legally speaking no - the enshrining of parental leave in law is primarily there to protect parents from being disadvantaged in the workforce, essentially preventing them being discriminated against. Does it get abused? Yes, I've seen it happen - is the abuse endemic and a huge problem? No, not in my experience and on balance I think it does more good than harm, everything like this gets abused to one extent or another (I'm sure everyone reading this probably at least knows someone who's thrown a sickie when they weren't really sick!)
If so, is this discrimination allowed by UK employment law?
It's not discrimination - being a non-parent isn't a protected group in the UK (and probably not anywhere)
Other than by having children, how should I go about getting a similar allowance of unpaid leave?
The closest direct equivalent is dependents' leave, it functions similarly to parental leave but applies to everybody - the time off is typically unpaid and intended for providing emergency care for a spouse, partner, child, grandchild, parent, or someone who depends on you for care. Unlike parental leave it only applies in emergency situations but it does have the advantage of being unbounded - you can take as much time off as is reasonable to deal with the emergency and you can have any number of instances. This is effectively the UK analogue of FMLA in the US and covers off your example scenario of caring for elderly relatives etc.
If the time off isn't for such an emergency or you don't have anyone who would class as a dependent then there isn't such a provision - but that's the same for parents, strictly speaking they can't take random unpaid time off either.
If you need to take additional time off (over and above your annual leave entitlement) then that comes down to individual agreements with your employer, and the responses will be just as varied as you might expect. If you find yourself in a situation where your lifestyle is such that it's a consistent need for you then self-employment is the way to go, you work when you want to work and only get paid for what you do and you can have as much time off as you want, finances allowing (at least that's the theory - speaking as a self employed person I've not actually had any time off outside of weekends and Bank Holidays so far this year!)