You can do whatever you want with the alfresco code including hacking the existing services or adding new ones.
However if you want to "play nicely" then you put your new service in an AMP to keep it separate from the main alfresco code. For example you can look at the RM AMP.
And if your service could be useful to others then please consider contributing it. Good luck.