In that sentence,
walking is not a gerund, no. A gerund acts like a noun, and you can't have a noun after
while.
It's part of a verb in the past progressive tense.
I was is left out. You can call it a participle.
While (I was) walking in a field I saw ...To have a gerund, you'd need something like this:
Walking in a field is a good way to enjoy nature.walking (in a field) is now the subject of the sentence, so it's noun-like, so it's a gerund.
CJ