The problem with just replacing one fret is getting a fretwire that matches the existing frets. Obviously you can measure the width and the height, which all helps to narrow the selection down, but the fret material itself can vary considerably, with differing hardness and things like copper content that can affect the colour. You'd also probably need to remove the fret first to measure the tang width, as these can vary a bit. You don't want to get a fret with a thinner tang or it will just fall out.