People leave jobs, so consider what it means to have a manager reference for every single job you've had. Does that mean "the person who was your manager, and if they left you're out of luck and never get a job again?" No.
Reference requests from places you were fired from are common enough and yes, asking is professional.
Some of the confusion is there's two different meanings for "reference." One is "someone who is going to avidly vouch for you" - which you have a couple of and provide on request - or "someone in each company who's going to say you existed." You have to use context clues to decide which they mean - but in this case it's clearly the latter.
Firstly, you can give the information of anyone in management, in other words, it doesn't just have to be your direct manager. Were there any other managers you were on good terms with?
Secondly, in the case of being terminated (or, indeed, in the case of your manager not being there any more), you can provide them with the company HR contact info instead. Putting the name of your manager is fine, if there's a good reason for HR to connect them through they will.
Thirdly, you are letting a form psych you out. I worked for a company that went out of business. There's not even a HR contact to give. New employers cope with the realities of the world.
So if you had anyone above you that you were on good terms with put them. If it's just your past manager, put them or them with HR's phone number. All either is going to do is confirm the facts of your story; going into "why you sucked" is lawsuit bait and everyone in management gets warned "don't do that, just say date started date ended and whether they're eligible for rehire."