As Karlson mentions, Bereavement fares exist at some airlines, and you might be able to take advantage of them. If you know in advance which friends and family might need a sudden visit, and you know that certain airlines are likely the ones you will have to use, research their bereavement policies in advance.
As gagravarr suggests, frequent flier miles might get you a flight on short notice with no higher expenditure of miles than a flight planned long in advance might cost. The drawbacks with frequent flier miles are that a) you might not have enough miles on hand, and b) the airline might not have a seat available for miles travel on the flight you need.
Consider travel sites that specialise in last-minute travel. Hotwire and Priceline specialise in discount tickets with little lead time required. Regular travel sites like Kayak and Travelocity make it easy to search multiple carriers for whatever fares they offer. Maybe they'll have something, maybe they won't; but it's worth a try.
Similarly, consider airlines that specialise in everyday low fares. Southwest Airlines in the USA, and WestJet in Canada, have sometimes provided me with reasonable rates even when I didn't plan ahead.
Finally, there are "ticket-hacking" approaches like Vince suggests: combine two round-trip tickets, one from your origin to your destination with a return in the far future, and one from your destination to your origin with another return in the far future. Then travel only the outbound leg of each ticket, and throw out the other. The airline may notices this and try to stop you, but apparently some people have done this successfully.