I don’t think it’s (necessarily) a contradiction. The problem, as I see it, is that we tend to use the word happiness in colloquial speech for some kind of an ultimate state of pleasure and well-being - in that respect, no, not every. single. action is necessarily performed to bring about (even partially) that kind of state. When you eat an apple, presumably you don’t normally reason about that single action in the broad context of “attaining happiness”.
However, to basically paraphrase Mises - you do act, and an action is by definition guided by some purpose, which lies in an uneasiness you’re trying to alleviate - because that’s a prerequisite of an action, otherwise you wouldn’t act, because if you were in a perfect state (literally perfect, something that’s complete in all of its parts and has no need for action of any sort because it has no goals to attain or changes it wants to bring about), an action would be a contradiction in terms. So, your small mundane action is guided by a desire to replace a state of things you prefer less with a state of things you find more satisfactory and in that respect, you are aiming at “happiness”, in a sense of a preferable state of things. When you’re hungry, it’s preferable to eat and you’re motivated by hunger, and other times you may be motivated to eat, say, out of boredom - but in all of those cases, you’re looking into increasing your well-being and changing something that you find less comfortable with something that you find more comfortable. So think of that “happiness” not in a sense that there’s this Big Idea Of Ultimate Happiness that somehow “guides” all of your actions towards an Ultimate Goal, but in a sense of an expectation of a future better state of things that’s at the core of your every action, and action as such, and that wouldn’t happen without your interference.
So, it’s one and the same - you eat an apple because you prefer “eating an apple” and a future “having eaten an apple and alleviated hunger”, which is the expected source of “happiness” for you in that particular case.
Let’s say you don’t eat an apple. If the apple is in front of you and you don’t eat it, you see your expected source of “happiness” in something else - for example, a personal accomplishment, say you’re on diet, in having resisted the temptation, so however you look at it, you always end up going for “happiness”, i.e. for what you deem to be the most satisfactory choice for you. Or may have a poor self-control and beat yourself up after, so succumb to the temptation, and realize that in most states of mind not eating an apple would be preferable and would make you “happier” in the long run, but in that very moment when the decision was done, your priorities were different and you did prefer eating an apple to a feeling of accomplishment in not having done so. Unless you’re physically coerced, i.e. unless somebody shoves it down your throat against your will or a physical possibility to prevent it, whatever you did or didn’t do, you did make a choice that at the time of action you felt would make you “happy”.
Different men are in different circumstances, and desire different things, and sometimes in same circumstances desire different things for a number of reasons, from individual disposition to feeling societally constrained or “obligated” to act in certain ways, and at the end of the day, it doesn’t even matter what the “ultimate” reason for doing something was. People can make choices that they philosophically disagree with, and they can make choices that are uncomfortable for them, just like they can make choices that are congenial to them - but in all of those cases, they choose from the options they have the ones they believe would bring about a more satisfactory state of things.
A person on a diet will not be “comfortable” with the choice to forgo the apple, and may even grieve it, but the fact alone that they chose to do it means that they valued something else above their (current) comfort level, and that - paradoxally perhaps - constitutes their “happiness” in that act.