I finally found it thanks to @broccoli forest's link in the comments.
The book says:
And when the Lady Kaga no Chiyo lost her husband she wrote, merely:
All things that seem
Are but
One dreamer's dream
I sleep 1 wake
How wide
The bed with none beside."
Then, having lost also her child, she added two lines:
Today, how far may he have wandered,
The brave hunter of dragon-flies!
It talks about 福田千代尼 = Fukuda Chiyo-ni (or [加賀千代女]{かがのちよじょ} = Lady Kaga no Chiyo). She was an Edo era poet who lived 1703 to 1775.
She is said to have married at 18 but quickly lost her husband to disease, as well as having a child which she quickly lost too. However none of this is known for certain. (source)
The original poem in Japanese goes:
とんぼつり今日はどこまで行ったやら
Tombo tsuri kyou wa doko made itta yara
Dragonfly hunting. I wonder how far [he] went today (my attempt at a more literal translation)
According to this source, this haiku is attributed to Kaga no Chiyo but it is not certain if she wrote it or even if she was married. It is said to be a haiku about the loss of a child, as you said.
jphaiku.jp discusses this haiku as an example of good haiku writing in conveying emotion through objects or the scenery rather than stating them directly.
The site says:
いなくなってしまった息子は、きっとどこか遠くまでとんぼつりに出かけてしまったのだろう、早く帰ってこないかなぁ、という子供を偲ぶ句です。
あるいは、息子は天国でもとんぼつりをして楽しく暮らしているのだろうか、という解釈もできます。
作者の感情を断定的に書かないで、とんぼつりに託したことで、読み手は千代女の気持ちを想像して、より深く、その悲しみや寂しさ、親心などを理解し、共感することができます。
This is a poem honoring the memory of her dead son which can be understood as saying that, "he must have gone far from home hunting dragonflies, I hope he comes back soon..."
Another possible interpretation is that the son is enjoying a fun life hunting dragonflies in Heaven too.
Because Chiyo conveys her emotions through the medium of "dragonfly hunting" rather than simply stating them, the reader can better sympathize with her and more deeply understand and imagine her grief, loneliness, and parental love for her child. (my translation)