If I understand your question correctly, yes, you can.
I'm assuming you have a linked list and you want to change it to a stack and a queue.
To me, it looks as if you are suggesting taking the code for your linked list, making two copies, changing "insertatfirst" to "push" in one and changing "insertatlast" to "pop" in the other. You could do it that way. But, if you are using Object-Oriented Programming, it isn't the best.
Another way is to let "stack" and "queue" to each inherit from your linked list. But, you would want to do this in a way that hides non-stack methods of the linked list in your stack and hides non-queue methods of the linked list in your queue.
A better way is to write your stack and your queue to each use a linked list as a private member. Then each method for the stack and each method for the queue would call the corresponding linked list method. That is, your stack and queue would each be a linked list wrapper.
By the way, a "pop" method usually *removes* an object from a stack. By using it as an insert method, you are likely to create some confusion. To add an item to the end of a queue, you might want to say "enqueue".