Sounds like you were already pulled over. You mean you were ticketed for stopping next to a hydrant.
What state is this? In many states, it's illegal to even sit in your car and wait with the engine running next to a hydrant. We still call that parking.