In the SharePoint 2013 masterpage the elements that shouldn't be visible in the dialog mode (IsDlg=1) have the "s4-notdlg" CSS class applied. To solve your problem you have the following options:
- Dynamically (using jQuery for example) remove the s4-notdlg class form the div of the.Ribbon section
- Use the open-source library SharePoint 2013 Easy Ribbon API. We have tested this library with custom application pages, and it seems to satisfy all our needs.