There is something to learn out of every word of Torah, even if there is no mention of a specific mitzvah. This can be seen in Parshas Balak, as Rabbi Nasan Maimon teaches, quoting Sefer Oneg Shabbos from Reb Ephraim'l Krakofsky of Pshadvorz, which contains teachings based on Reb Nachman of Breslov. The entire shiur, which also contains teaching from Likutei Mohoran on Balak, can be listened or downloaded here.
From Parshas Bo and on, almost every parsha contains mitzvos. One of the few that don't contain any mitzvos is Parshas Balak. Even though there are no formal mitzvos, there is still much to learn out from it. The parsha gives allusions to "hisbodedus" (personal informal prayer to Hashem), which is supposed to be done ב׳ינו ל׳בין ק׳ונו. The first letters of these words spell בלק. In the parsha it says הֶן עָם לְבָדָד יִשְׁכֹּן (it is a people that dwell alone) (23, 9). The word לְבָדָד alludes to hisbodedus, being alone praying to Hashem. The word בדד also contains the first letters of בכל דרכיך דעהו "in all your ways, know Him" (Mishlei 3, 6). The word יִשְׁכֹּן has the numerical value of השעה, "the hour", which is the amount of time Reb Nachman says one should dedicate to hisbodedus.
When Bilam went to try to curse the Jewish people it says וַיֵּלֶךְ שֶׁפִי - "he went alone" (23, 3). This means that he tried to use this special connection of hisbodedus to connect to Hashem to accomplish what he wanted. He reasoned that man has free choice to do good or evil and therefore this would work for him to do evil. However, this was not the case, since his desire was to destroy the entire Jewish nation.
What we can see from this small piece is that there are lessons to be learnt out of every part of the Torah that teach us how to serve Hashem better.