I think what you want to do is within the guidelines and would be an acceptable practice. I have included two examples of what you could do as well as the example that @tehShane provided.
You could extend the toolbar to include a persistent search bar like the example below. With the new Toolbar widget it is very easy to customise and extend your toolbar to suit your needs.
You could have a persistent search bar that is anchored just below the toolbar like the example below.
Another approach would be to use a SearchView, here is an example of an app that uses a SearchView in the toolbar.
Either way it would be perfectly acceptable practice, of course you would want to test which solution is best for your app and your users.