You can cut an individual piece of hardwood out along with any protruding tongues and nail + edge glue a replacement in (cut the offending board down the middle and then pry it up half at a time). Takes a lot of patience and time.
Yeah, I do weaved in repairs for water damage all the time for hardwood floors.
Laminate can't be patched in like that though, so once the floor is damaged, ALL of it gets replaced.
Even when you can patch, new stuff won't be the same shade as the currently installed stuff, and since you can't refinish it, it'd still likely all be replaced.