Could a titled French noble sell his title and/or land to settle debts? Also, could a titled noble be sentenced to debtor's prison for inability to pay debts? I'm wondering about gambling debts in particular. Thanks.
A title was tied to a land. By around the 16th century, land was generally a private property and the owner was free to use it as he wishes to. But if said owner sold a land which was tied to a title, the title went with it. Yes, land could be sold because of its private nature. Debts would be a reason to sell a land and a title.
As for being imprisoned for debts yes absolutely. It is not rare to have a father ask that his son be imprisoned for a short amount of times (generally several days, a couple of weeks) to punish him for indebting the family and/or for his poor mores if the debt was acquired in a disreputable situation (such as gambling). The richest and most powerful families were almost always in debts because they were always in need of more money to keep their luxurious lifestyle. The counts of Nevers was one of these famous families that went through a deep financial crisis. Of the most illustrious lineage, the county of Nevers was in the hands of the La Marck family by the 16th century. Although the family seemed to be at its peak at this (King Francis I erected the county into a duchy to reward count François for his excellent service during wartime, he also had other counties, baronies, ...etc.), it was crippled by debts. The financial situation of the family has been studied by Denis Crouzet, a famous 16th-century historian, and pioneer in France of the history of violence. The reasons of these debts are numerous but he tells us that the dukes of the Nevers had to sell some of their lands to settle their debts. For example, selling a titled land to a rich individual (looking for a titled land) who in turn promises to settle the debt with X creditor. Ultimately it was not enough, the monarchy had to intervene in 1564 when the duchy ended up in the hands of Duchess Henriette. The King pushed for a lucrative marriage with an Italian prince who could absorb the debts of the family. This marked the end of the La Mark family.
Debts were also present among the lowest noble families. Poverty in the nobility has often been forgotten in historical studies, but it is necessary to know that some families were extremely poor, poorer than peasants sometimes. These people had little ways to increase their revenues and for example, turned into poachers to sell the products of their hunt or fishing. Of course, if these people wanted to eat and try to raise their children, they had to borrow a little money. Guy Chaussignand-Nogaret gives us a good portrait of one family in his book The French nobility in the 18th century: from feudalism to enlightenment (I have the French version but it exists in English under that title):
According to an English traveller, Smolett, some gentlemen from the Boulonnais only had one meal per day, they never hosted for dinner and as they did not possess the means to raise dogs or buy rifles, their only distraction was playing cards.
The author is not saying these people gambled, but it gives us a good overview of the only way left for some of these families to earn money. Nobility could be a vicious circle for the poorest as they did not have the means to buy a position in the army (the lowest way to earn a pension afterward) or to provide an education for the children. At some points, they had to contract debts up to the moment they had to sell what little property they had. They then became nobles without land or titles. During the Estate Generals, they are stories of beggar nobles. Not many of course, but still the majority of the nobility was either poor or of average wealth.
Finally, there were laws protecting creditors against dishonest debtors, nobles or not. When a debtor could no longer pay back his debts, a judge took the case for examination who would prioritize looking for fraud. During this time the debtor would be incarcerated (and paying for his food and an incarceration fee). But the complexity of the Ancien Régime is such that laws were rarely the same for the entire kingdom.
I hope this helps you. I recommend you look at Chaussignand-Nogaret's book. I also used François Bluche's La noblesse française au XVIIIe siècle.