this should mean that one must obtain a license to sing at a wedding
or other party, if covering songs that one does not have the rights
to?
It does, if it otherwise qualifies as a "public performance."
Is there any exemption for religious functions?
No.
Is a wedding party considered 'public'?
It depends.
A wedding in a remote field with the bride, the groom, seven guests, the officiant, and the two person band (the wedding my neighbor described having to me this morning), probably wouldn't count as a "public performance."
The Duke of Cambridge's wedding in Buckingham Palace with thousands of people in attendance and television coverage probably would.
Where the line is drawn would be a question of fact for the judge (or in the U.S., usually the jury) to decide on a case by case basis.
According to BMI, the owner/administrator of a large share of all copyrights of popular music:
A “public performance” of music is defined in U.S. copyright law to
include any music played outside a normal circle of friends and family
that occurs in any public place. A public performance also occurs when
music is transmitted to the public, via radio, TV broadcasts, digital
service providers, and any other means.
But, this isn't an interpretation of the law from a neutral and impartial party, so it should be taken with a grain of salt.
According to Wright State University (a public university in Ohio) and referencing U.S. law:
When is a performance considered "public?"
A public performance is one that is "open to the public or at any
place where a substantial number of persons outside of a normal circle
of a family and its social acquaintances is gathered." (17 USC 106)
This includes any screening outside of the regular curriculum in the
classroom, such as showing films for extracurricular events, or
sponsored events by a center, club, or organizations.
Are there instances that do not require obtaining public performance
rights?
Viewing a film at home or in the classroom "in the course of
face-to-face teaching activities" as part of the regular curriculum is
not considered a public performance (17 USC 110).
The U.S. Copyright registrar states:
Section 101 of the Copyright Act states that performing or displaying
a work “publicly” means:
• “[T]o perform or display it at a place open to the public or at any
place where a substantial number of persons outside of a normal circle
of a family and its social acquaintances is gathered; or”
• “[T]o transmit or otherwise communicate a performance or display of
the work to a place specified [in the preceding paragraph] or to the
public, by means of any device or process, whether the members of the
public capable of receiving the performance or display receive it in
the same place or in separate places and at the same time or at
different times.” 17 U.S.C. § 101.
Although the statute does not define the term “public,” it “suggests
that ‘the public’ consists of a large group of people outside of a
family and friends,” such as “a large number of people who are
unrelated and unknown to each other.” American Broadcasting Companies,
Inc. v. Aereo, Inc., 134 S. Ct. 2498, 2509-10 (U.S. 2014).
The legislative history explains that a performance or display
constitutes a public performance or a public display if it occurs “in
a public place.” It also explains that a performance or display that
occurs in a “semipublic” place, such as a club, lodge, factory, summer
camp, or school, is considered a public performance or display. H.R.
REP. NO. 941476, at 64 (1976), reprinted in 1976 U.S.C.C.A.N. at
5677-78.
By contrast, a performance or display that occurs at “a gathering
confined to [an] individual’s social acquaintances would normally be
regarded as private.” Id.
A performance or display that occurs during “[r]outine meetings of
businesses and governmental personnel” would be normally considered
private “because they do not represent the gathering of a ‘substantial
number of persons.’” Id., reprinted in 1976 U.S.C.C.A.N. at 5678.
Likewise, “an entity does not transmit [a work] to the public if it
does not transmit to a substantial number of people outside of a
family and its social circle.” American Broadcasting Companies, 134 S.
Ct. at 2511.
The legislative history further explains that a public performance or
a display includes “the initial rendition or showing” of a work, as
well as “any further act by which that rendition or showing is
transmitted or communicated to the public.” H.R. REP. NO. 941476, at
63, reprinted in 1976 U.S.C.C.A.N. at 5676.
“[F]or example, a sing[er] is performing when he or she sings a song;
a broadcasting network is performing when it transmits [that]
performance (whether simultaneously or from records); a local
broadcaster is performing when it transmits the network broadcast; a
cable television system is performing when it retransmits the
broadcast to its subscribers; and any individual is performing
whenever he or she plays a phonorecord embodying the performance or
communicates the performance by turning on a receiving set.” Id.,
reprinted in 1976 U.S.C.C.A.N. at 5676-77.
A performance or display that is transmitted to the public is
considered a public performance or a public display “even though the
recipients are not gathered in a single place, and even if there is no
proof that any of the potential recipients was operating his receiving
apparatus at the time of the transmission.” Id. at 64-65, reprinted in
1976 U.S.C.C.A.N. at 5678.
“In other words, ‘the public’ need not be situated together, spatially
or temporally” for a public performance or public display to occur.
American Broadcasting Companies, 134 S. Ct. at 2510.
Moreover, “when an entity communicates the same contemporaneously
perceptible images and sounds to multiple people, it transmits a
performance to them regardless of the number of discrete
communications it makes.” Id. at 2509.
For instance, when an entity “streams the same television program to
multiple subscribers, it ‘transmit[s]… a performance’ to all of them,”
regardless of whether the entity makes the transmission “from the same
or separate copies” or from “user-specific copies.” Id. (quoting 17
U.S.C. § 101 (definition of “perform or display a work ‘publicly’”)).
As these examples illustrate, however, there are large gray areas (which is par for the course in copyright law).
Does it matter if one is singing at the party pro bono?
This is a factor that goes to whether the performance is not infringing because it is "fair use", although not the only one. This factor is probably more important when performing a cover of a song where a license can be obtained mandatorily, than in other fair use cases, because the statutory royalty is usually a percentage of gross revenues. If the revenues from the public performance of a cover of the song are zero, the harm done to the copyright owner from the public performance is zero, or at least, is nominal.
On the other hand, an unlicensed performance by an unpaid performer at a large event that the copyright owner is ideologically opposed to could still give rise to an infringement lawsuit. There have been several cases of that kind involving political rallies.