Typical Fenderish string spacing is 0.75 inch between strings, which works out to an overall width of 2.25 (plus a smidge for string thickness). And as you go towards the neck, that dimension gradually narrows. So yeah, 2.5 inch magnets should work fine.
I measured the string spacing from the out side of the "G" string to the out side of the "E" string and got 2.23". That gives me Just over 1/8" over hang on each side. I'm guessing that should be enough.