Walking uphill both ways is possible.
If you walk up one side of a mountain and then walk down the other side of the mountain to get back down and then walked back up that side of the mountain again then you would be walking uphill both ways.
I had a road like that I used to walk to school on as my school was down that hill and I had to walk down that hill to get to the school and had to walk back up that hill to get back home and then walk down the hill again to get to my house.
When most older people say they walked to school uphill both ways they are likely lying about it.
However I used to walk to school that was down a hill and the road to the school was basically where you had to walk up a slanted road and then walk down a slanted road.
So in that case I did walk uphill both ways going to and from school.
For example if you walked up mountain on one side and walked down the mountain on the other side of the mountain then you would be walking uphill both ways.
So it's possible to walk uphill both ways but I believe a lot of the older folks are just telling a story that is not true.
My Grandpa used to tell me about a lot of stories that were really unbelievable.