EMR can act as "interactive" and "batch" data processing framework (EMR is hadoop framework). Glue is only "batch" mode data processing (ETL) framework (Spark ETL) with below additional capabilities.
Glue has many capabilities, some of them are
1.Glue Metadata catalog (Data Catalog - Database and tables)
2.Glue Crawler - Parse the data and create table definitions
3.Glue Jobs - ETL
4.Glue Workflows - Combined multiple ETL flow
5.Glue ML transforms - ML related transforms
6. Glue devendpoints - for developing Glue jobs in Notebooks
Glue is serverless AWS service, which means you don't need to spend time on setting up the underlying servers and nodes. (Even though, behind the scene Glue uses EMR though). You can choose the cluster size with the Glue advanced configuration though (by picking DPU 1.X or 2.X and number of DPUs DPU- Data Processing Units) refer this link Configuring DPUs
To answer your question with a specific answer:
Glue cannot replace EMR, EMR has more functional capabilities than Glue.
You can think of EMR as "Hadoop framework with ecosystems(including spark)", and
Glue as only "Spark ETL with Hive metastore capabilities"
yes, they both can co-exist. If they co-exist, Glue can act as ETL
framework to source the data, transform and store in S3 and maintain
table definition of that data set in "Glue Catalog". EMR can
use/access that dataset from S3 using "EMRFS" and Glue Catalog. Using
EMR ecosystems, you can analyze the data (with table definitions)