No, not if the two tables are in the same SQL statement. However, one can connect to two different databases in the same program, but you would need separate SQL statements to access them.
When there is any chance that tables might need to be accessed in the same SQL statement, they should be in the same database, but perhaps different schemas if they need to be logically separated. Having two databases active on the same machine at the same time is not very efficient because it limits the amount of memory that can be used by any one database.