Pan and bi can almost always be used interchangeably, yes, though bi*/bi*sexual is commonly used as an umbrella term for all non-monosexual identities, and is much more inclusive than simply saying 'bisexual' and/or 'pansexual'.
If someone identifies as pansexual, it's not alright to call them bisexual and vice versa, because that's not their identity. If you're deciding on an identity, though, pansexual denotes an attraction to all genders, so it's a bit more specific than bisexual, which can mean attraction to any number of genders between two and all. As long as you keep that in mind, you can identify as you like!