NSF grant proposals after earning PhD
Are there examples of a postdoc at an institution being awarded an NSF grant to stay at that institution (before their postdoc runs out)?


Yes, it does happen.


  Are there any particular pitfalls I could find in applying at an institution that is already planning on paying me for three years? That is, if the NSF funds me then the job market "lost" a job in the sense that my postdoc position won't be replaced by my institution.


Assuming you are talking about the MSPRF program, it can be combined with your postdoc at University X.  One common pattern is to use the NSF postdoc half-time for the remaining two years of your current postdoc (to reduce teaching) and then full-time for one more year after that.  This is called the Research Instructorship option in the MSPRF instructions.

Combining NSF postdocs with university postdocs is very common in mathematics, so you shouldn't worry that it will be viewed as strange or problematic.  The only case I'm aware of in which the job market clearly "loses a job" is that if you are offered an NSF postdoc and do not accept it, then the position disappears for that year (there is no waiting list of backup candidates).  So if you decide it's not what you want before the awards are made, you should withdraw your application.