been a manager long enough to know both sides of this. people who got laid off often worry that their former manager will say something damaging. let me be real about what most companies actually allow and what actually happens.
what HR policy usually says: most mid-to-large companies have a 'confirm employment only' policy for official HR references. dates of employment, title, and whether you're eligible for rehire. that's it. anything more personal goes through the manager voluntarily.
what actually happens: managers get called. they answer. many say more than they should, especially at smaller companies. the EEOC and state laws vary significantly on what's considered defamation, but in practice if someone says something negative and specific, the legal risk is real enough that most managers err toward neutral.
the 'eligible for rehire' question: this is where layoffs matter. a genuine RIF (reduction in force, no performance cause) should come with a 'yes' to eligible for rehire, or at worst a 'company policy prevents us from answering that.' if you were let go in a layoff and the company marks you as not eligible for rehire, that's unusual and worth asking about before you leave.
practical moves: before you leave, ask your manager directly: 'if someone calls you for a reference, how would you describe my work?' good managers will tell you what they'd say. it also surfaces any issues before they become surprises.
ask HR specifically: 'what is the company's policy on employment verification calls?' and 'am i marked as eligible for rehire?'
if you have any concern about a specific person at your former company, list a different reference. you can include former colleagues who left the company, skip-level managers from earlier roles, people from other departments. references are not limited to your direct chain.
most layoffs don't generate bad references. companies doing layoffs don't want the legal exposure. they want you to move on quietly, just like you want to move on.