First, you should realize that there is no straightforward way (as of today) to pass text/strings via RPC. Any space, comma or other non-alphanumerical character will terminate the string. See ticket #17.
I'd try to answer your question first, though I think it is not the right approach, and I explain second:
The "myrpc" example blinks the LED, so yes, it is needed for that function, and no, it is not needed for yours. Since you obviously want to implement another function, my guess is that you don't need a pin for LED, so it can be removed.
From what you posted it appears that you did not declare lcd object, hence all the compile errors. I assume you would want your lcd hooked up to some mbed pins, right? Then you probably want to let your object instantiation know which pin(s) to use, and the class should create the actual object somewhere. But to me it is a more difficult way... Here's why:
I guess that you have lcd class taken from some other example. I suggest it would be easier to start with working lcd example, then incrementally add rpc capability to it. It will be easier because "myrpc" class just demonstrates how to hook up an existing function to RPC. Nothing prevents you from making a good working lcd class RPC-able.
Here's how I recommend attacking the problem of RPC:
First look at the code between #ifdef MBED_RPC and #endif, make sense out of it. (Hint: code between #ifdef MBED_RPC and #endif describes class constructor and functions/arguments that are accessible via RPC, but it uses different syntax which fills in data structures. You will have to map C++ to these descriptions)
Then copy-paste that code into your lcd class .cpp and .h files as a template, then replace "myrpc" with "lcd" everywhere (your class name), remove "blink" function description since you don't need it and insert function(s) that you want, following the syntax of the "blink" example.
I realize that it will be tremendously difficult for a newbie to figure it all out before even understanding C++ (RPC and C++ introspection limitations are by far the most complicated concepts), so give C++ book a good study. You should fill very good about yourself when you'd make it work.
I want to do something like this:
Is there a sample code that can be used to provide RPC for custom classes / functions?