When you pass an :object to a Rails partial, a local variable (not an instance variable, beginning with @) is defined within the partial which has the same name as the partial. So for the partial sidebars/_pages.html.erb, your local variable will be called pages.
The value of the pages local variable is the Hash you passed as the value of the :object option, and none of the instance variables you had in your "outer" view will be available (such as @categories or @myobject). So you'll need to access those via the pages local variable.
You're probably looking for something like this:
<%= render 'sidebars/pages', :object => { :categories => @categories, :myobject => '1', :mmyobject => '2' } %>
And in sidebars/_pages.html.erb, you might have something like this:
<p><%= pages[:myobject] %></p>
<ul>
<% pages[:categories].each do |category| %>
<li><%= category %></li>
<% end %>
</ul>
See the Rails Guide to Layouts and Rendering's Partials section for more details.
Update:
An even better solution would be to use the :locals option, which accepts a Hash whose keys become local variables with the partial. For instance:
<%= render 'sidebars/pages', :locals => { :categories => @categories, :myobject => '1', :mmyobject => '2' } %>
And in sidebars/_pages.html.erb, you might have something like this:
<p><%= myobject %></p>
<p><%= mmyobject %></p>
<ul>
<% categories.each do |category| %>
<li><%= category %></li>
<% end %>
</ul>