In the U.S. today, most employers will not give any information beyond the dates that you worked there, maybe your job title.
In the past a former employer would routinely write a "letter of recommendation" for you which could be quite specific. At the least it would say that you were a good worker and honest. If they didn't think you were a good worker, they'd refuse to write the letter. If a potential new employer called the, they would cheerfully discuss your pros and cons as an employee.
But not today. Company's are afraid of being sued. The less they say, the less risk that something they say could get them into trouble.
So given that, sure, you could lie about your salary. If they did somehow find out you lied during the job interview, that could be grounds for immediate firing. And what would you gain? If pay at your last job was reasonably typical for your position and experience, there'd be little to gain by lying about it. Say you were making, whatever, $40,000 per year, and that's typical for this sort of job. You tell a potential employer that you made $80,000 per year. Unless you impress them so much in the interview that they conclude that you are worth twice as much as any other applicant, they're just going to say, "we can't afford this guy". Okay, you could lie by a small, more plausible amount, like say you made $42,000. But then so what? If you say you used to make 40 but believe you are worth 43 and so that's what you expect, versus you used to make 42 and now want 43, it shouldn't make much difference to the company either way.
I'm sure there are scenarios where lying about your past salary could help. But I wouldn't take the risk. The benefits are small if any. And you would have to spend your entire time with that company living in fear that they will find out you lied. I've come across cases where people lied on a resume and no one found out until years later, but then they were fired and publicly humiliated. Not involving salary, the cases I can think of are people claiming college degrees or military service that they didn't really have, but the same idea.