Yes, so using javascript to redirect instead of header, you can do this. header won't work if there's output, which you'll have to have if you plan to open a popup window on that page.
<?php
if(error) {
?>
<body onload="window.open('pop_up.php');self.location.href ='someotherpage.php'">
<?php
}
Another method would be to put a get variable in the location you're redircting to. Then on that page, check for the variable, if it exists, show you're pop up.