Darn, back to the drawing board.
What you want to do is very similar to what a "simple" text editor does.
Since you mention you're dealing with a csv file, the simple way would be to read the entire file into memory, create an index (array of pointers to lines), the index would give you the direct access you're looking for. When a line is modified, allocate a new block of memory to hold the edited line and a second pointer in the index to that block.
This way your index has two pointers, pointer to original line, pointer to modified line (or nil if it has not been modified), that allows you to seek to any line at any time. Saving the file can either be done by saving one line at a time (inefficient) or creating a temp block of memory that contains all the lines, unmodified and modified. That way the entire block can be saved in a single I/O (much more efficient.)
Note that this method is fine for reasonably small files (say less than 50MB - off the cuff estimate), for larger files, something a little more sophisticated may be necessary to ensure reasonably good performance.
Obviously, while this way you get direct access to any line, this access is _not_ obtained using Pascal functions but your own.
HTH.