A grain of sand is actually a very small rock.
It is very possible that it has jammed the lens carrier.
Error 18 is Canon's code for a lens jam.
There has been a lot of threads about Error 18.
Several people have been successful in clearing a lens jam. I suggest you read all of one of the longer of the Error 18 threads and see if their suggestions will help your camera:
http://reviews.cnet.com/5208-7813-0.html?forumID=58&threadID=56917&messageID=675931
...
..
.
hi,
my canon camera has got some problems, it is opened and is not closed when I turn it off,and I can't do any thing with that now I can't even play the photos.
It has error 18 and I think some snad went into it, because it happened at the beach when I just put it down for 1 second, I would be thankgul if you tell me what to do in order to make it wotk again.
thanks

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic