To remove sections or items from an ini you can use /remini.
It follows the same structure as writeini. Use /help /remini to guide yourself.

What you know from the script is that it will only ever function in an on text event as some of the parameters like $nick and # will only follow assuming it's from that event.
Thus, the first step you need to do is all the quote alias. Now, as the original author I already know that it calls the alias everytime !quote is called. Typing !quote [random text] will call the quote alias with any random text as well, filling $1-.

So, with this knowledge we can script some basic stuff.

If you look at the alias, you can see that we have an if statement asking for if ($1 == add) { }
Considering that this works like !quote add ... you can make something similar like elseif ($1 == rem) { }

Inside these brackets you would have to check for a number or a string. Let's make the simplest one, a number.
Let's assume that the script will use $2 as the number. So it would look like this in the alias; $1 == rem, $2 == nr. and like this in the text event !quote rem nr.
Code:
elseif ($1 == rem) { 
if ($nick !isop #) { return } 
var %2 $remove($2,$chr(35)) 
;Above makes sure to remove any chr(35) which is # from the string.
if (%2 isnum) { 
;%2 is a number, we know that now. Let's remove it
remini quotes.ini # %2
}
else { 
;Here you try to search if %2 is a string that matches something in the file
}
}
Now, this code is not really designed that well. Let's say you have 50 quotes and remove #33. #32,#34,#50 would still be all the same, only #33 would be gone. The next time a quote is added, it would take the number of items in the ini and add +1, which would be 49 + 1 = 50 and overwrite that. Now the workaround would be not to actually use remini but overwrite the #33 instead. Let's say you use
Code:
writeini quotes.ini # %2 DELETED
instead. This would work for the future. But definitely looks bad if someone wants to use that quote, or it's on random.

My recommendation? Use the script you have for reference, make your own version and scratch that one.