Ah the wonders of powershell.
You have a 2 dimensional array (don't call it myAssociativeArray, that's as confusing as $myInteger = 3.1415) which looks something like:
((1,11,22),(1,21,42)...)
You can think of this as an array of arrays.
You've clearly heard of the "comma trick" as it's in your code - if there's no comma, it's not an array. So (1,2) is an array and (,1) is an array with one element, but (1) is not an array it's a scalar value. Why am I telling you this? Well, your where-object cmdlet, for this data, returns ((3,31,124)) - that's a single array out of your array of arrays. Powershell then treats the foreach as iterating over this as a 1-dimensional array, NOT over the outer array containing a single element that's an array. So $row is no longer a row, it's an integer.
You can see this in action if you change the comparison from "-eq" to "-ne", the results will be all the lines as in your first example bar the last one. In other words it works as expected. Only when there's a single result selected by the filter is there a problem.
The way to fix this is to force powershell to treat the output from where-object as an array even when it thinks it can be flattened:
foreach ($row in @($myAssociativeArray | where-object { $_[2] -eq 124 }))
By the way, I sincerely hope this isn't related to your comment in the other thread about "learning a proper language". Powershell is a steaming pile of dogshit and should only ever be used if you're being forced to.