(Bottom in bold is a partial TL;DR)
The definition your book gives you only seems incoherent because you take "people act to make themselves better off" (your book's definition) as the same as (or similar enough to) "fulfills their desire for happiness" (your characterization or additional characterization in the question you presented). Let's ignore the whole sunk costs aspect of this question for now, as I think it is a diversion from a deeper misunderstanding with your question.
Imagine if someone burned all their money because they believed doing so would cause it to grow back in the form of plants that sprout lots of 100 dollar bills. They may be acting in a way that makes them "happy" (at least for them), but one would be hard pressed to say they are acting in a way that makes them "better off". You can argue that "making themselves better off" encompasses some sort of foresight to it as well. Once the money burner realizes that there will be no money growing plants coming out of the ground, they will no longer be happy, so they will not have done what is rational even by the definition that you gave. Pursuing what makes you happy or what makes you well off, we would take it to mean to do this across your whole life, not just go off of what you think is right in the moment before thinking things through.
What if this money burner never became unhappy? What if they sat there and waited for money growing plants to sprout until they starved to death, and that they were still relatively happy the whole time? I don't think anyone would intuitively call this rational behavior.
So what confuses me about this question is that you accuse the book of not having a rigorous enough definition to encompass what rationality is; that is, you say sunk costs is a specific example where the book's definition of rationality doesn't fall in line with what we would find to be intuitive, or, fitting with your particular characterization of rationality, to "fulfill their desire for happiness". But your characterization of rationality has its own problems too.
Admittedly, the classical economic definition of rationality is not meant to completely match what laypeople would think of when they think of rationality. It is meant as part of a framework for thinking about economic issues in an organized way, and an introductory textbook is only going to try to give you a broad picture for how to think about the basic concepts, rather than bore you with the fine epistemological details of what it means for a good citizen to be "rational".
But even just using common sense, you can argue that honoring sunk costs is still "irrational".
A sunk cost is a cost that is unrecoverable, or not worth recovering due to opportunity costs. So when choosing to put extra money into a wide variety of other choices you have to pursue, you should not even be thinking about the money you've already put it. That's just logical sense. You might say, what if I put just a little more money into something and then I get a reward from it? Then the cost is not unrecoverable here, but is it worth recovering? For example, what if I was training a worker and they don't seem to be learning. Should I continue putting money into this worker if they might eventually learn? The answer here is that it would depend on the opportunity cost of just finding another worker who maybe will learn faster with less training and money. But people will get hung up on the money that is already put into the existing worker that you've already hired, and that is what characterizes the sunk cost fallacy. It is the failure to adequately consider the opportunity costs of alternative options that contextualizes how economists think about the sunk cost fallacy.
Maybe all this exposition is not very compelling or tedious to follow. In that case, let's just shoot straight here. What is the rigorous definition of rationality that contextualizes how economists talk about rationality?
From Microeconomic Theory by Mas-Colell, Whinston, and Greene, we have
Definition 1.B.1: The preference relation $\succeq$ is rational if it possesses the following two properties:
(i) Completeness: For all $x, y \in X$, we have that $x \succeq y$ or $y \succeq x$ (or both).
(ii) Transitivity: For all $x, y, z \in X$, if $x \succeq y$ and $y \succeq z$, then $x \succeq z$.
In laymen's terms, completeness just means you have an opinion on all your options, whether one is better, worse, or indifferent to any other option. Transitivity just means if you like one thing better than a second thing, and the second thing better than a third thing, you have to like your first thing better than the third thing.
Completeness is usually where this definition runs into some raised eyebrows. Very few people will consider every option with every other option. Some people may completely ignore certain options and not think about them. That is something for behavioral economics to look at. But this definition of rationality does not leave room for inadequate consideration of opportunity costs when thinking about sunk costs, which is the main concern when we talk about sunk costs.
If you do get some sort of intrinsic value from "honoring" a sunk cost, some sort of abstract happy feeling or whatever, then it is not necessarily irrational in the economic sense. But most likely if someone goes off of this feeling, maybe they are not considering every option, and that would make it irrational. With my example of the money burner at the beginning, you have to have some sort of realistic expectations of what you can do with your resources, the opportunity cost or pursuing some other course of action, and it has to have some sort of careful thought put into it. You can pursue whatever you like based on if it makes you happy, and you can argue that that is a more compelling version of what rationality is to real people. But economists use the sunk cost fallacy to show that going for what makes us happy in practice (we commit the sunk cost fallacy all the time) is not necessarily what makes you better off.